Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos: if a "host dev" exists bind mount it over /dev #133

Open
wants to merge 1 commit into
base: gluster-4.1
Choose a base branch
from
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 "$@"