From 3c316f5c98d7b61868960fed4b42952d8a71d0b1 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Wed, 26 Jun 2013 21:59:31 +0800 Subject: [PATCH] Fixes the CEPH_ARGS env thing in the cinder-volume init.d script. Rewritten-From: 2964c85c5d4eaac994058bb5f176186a3a964496 --- xenial/debian/cinder-volume.init | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) mode change 100644 => 100755 xenial/debian/cinder-volume.init diff --git a/xenial/debian/cinder-volume.init b/xenial/debian/cinder-volume.init old mode 100644 new mode 100755 index db398bdc0..a66378bfa --- a/xenial/debian/cinder-volume.init +++ b/xenial/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() -- 2.45.2