--- LVM2.2.02.67/scripts/clvmd_init_red_hat.in 2010-07-17 18:33:02.185014713 +0200 +++ LVM2.2.02.67/scripts/clvmd_init_red_hat.in 2010-07-17 18:59:14.831553676 +0200 @@ -64,9 +64,8 @@ rh_status_q() { start() { if ! rh_status_q; then - echo -n "Starting $DAEMON: " + msg_starting "$DAEMON" $DAEMON $CLVMDOPTS || return $? - echo fi # Refresh local cache. @@ -86,7 +85,7 @@ start() ${lvm_vgscan} > /dev/null 2>&1 - action "Activating VG(s):" ${lvm_vgchange} -ayl $LVM_VGS || return $? + run_cmd "Activating VG(s):" ${lvm_vgchange} -ayl $LVM_VGS || return $? touch $LOCK_FILE @@ -111,27 +110,23 @@ stop() [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)" if [ -n "$LVM_VGS" ]; then - action "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $? + run_cmd "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $? fi - action "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $? + run_cmd "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $? # wait half second before we start the waiting loop or we will show # the loop more time than really necessary usleep 500000 # clvmd could take some time to stop - rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish + rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish if rh_status_q; then - echo -n "$DAEMON failed to exit" - failure - echo + fail return 1 else - echo -n "$DAEMON terminated" - success - echo + ok fi rm -f $LOCK_FILE @@ -141,7 +136,7 @@ stop() reload() { rh_status_q || exit 7 - action "Reloading $DAEMON configuration: " $DAEMON -R || return $? + run_cmd "Reloading $DAEMON configuration: " $DAEMON -R || return $? } restart() { @@ -152,7 +147,7 @@ restart() { # Try to get clvmd to restart itself. This will preserve # exclusive LV locks - action "Restarting $DAEMON: " $DAEMON -S + run_cmd "Restarting $DAEMON: " $DAEMON -S # If that fails then do a normal stop & restart if [ $? != 0 ]; then