Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CentOS/update-params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
: ${GB_LOGDIR:=/var/log/glusterfs/gluster-block}
: ${TCMU_LOGDIR:=/var/log/glusterfs/gluster-block}
: ${GB_GLFS_LRU_COUNT:=15}
: ${HOST_DEV_DIR:=/mnt/host-dev}

echo "env variable is set. Update in gluster-blockd.service"
#FIXME To update in environment file
Expand All @@ -15,5 +16,11 @@ sed -i "s#TCMU_LOGDIR=.*#TCMU_LOGDIR='$TCMU_LOGDIR'#g" /etc/sysconfig/tcmu-runne
sed -i '/ExecStart/i EnvironmentFile=-/etc/sysconfig/tcmu-runner-params' /usr/lib/systemd/system/tcmu-runner.service
sed -i '/tcmu-log-dir=/s/tcmu-log-dir.*/tcmu-log-dir $TCMU_LOGDIR/' /usr/lib/systemd/system/tcmu-runner.service

if [ -c "${HOST_DEV_DIR}/zero" ] && [ -c "${HOST_DEV_DIR}/null" ]; then
# looks like an alternate "host dev" has been provided
# to the container. Use that as our /dev ongoing
mount --rbind "${HOST_DEV_DIR}" /dev
fi

# Hand off to CMD
exec "$@"