From: Thomas Goirand Date: Wed, 26 Jun 2013 13:59:31 +0000 (+0800) Subject: Fixes the CEPH_ARGS env thing in the cinder-volume init.d script. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2964c85c5d4eaac994058bb5f176186a3a964496;p=openstack-build%2Fcinder-build.git Fixes the CEPH_ARGS env thing in the cinder-volume init.d script. --- diff --git a/debian/cinder-volume.init b/debian/cinder-volume.init old mode 100644 new mode 100755 index db398bdc0..a66378bfa --- a/debian/cinder-volume.init +++ b/debian/cinder-volume.init @@ -32,9 +32,6 @@ DEFAULTS_FILE=/etc/default/cinder-common if [ -r /etc/default/cinder-volume ] ; then . /etc/default/cinder-volume fi -if [ -n "${CEPH_ARGS_EXPORT}" ] ; then - export CEPH_ARGS=${CEPH_ARGS_EXPORT} -fi mkdir -p ${LOCK_DIR} chown ${CINDER_USER} ${LOCK_DIR} @@ -58,9 +55,15 @@ do_start() { start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \ || return 1 - start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 + if [ -n "${CEPH_ARGS_EXPORT}" ] ; then + CEPH_ARGS="${CEPH_ARGS_EXPORT}" start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + else + start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + fi } do_stop()