Package: rpcbind
Version: 0.2.0-8
Severity: normal
Tags: patch
In case rpcbind is already running when the init script
is used to issue a second start, the encapsulated use
of log_begin_msg twice, makes a mess of output. It is
better to delay the only call to log_begin_msg, and to
report "Already running" via log_action_msg. Patch is
included.
Regards,
Mats Erik Andersson, DM
--- etc/init.d/rpcbind.orig 2012-06-15 13:57:30.000000000 +0000
+++ etc/init.d/rpcbind 2013-08-26 15:25:29.000000000 +0000
@@ -51,14 +51,13 @@
touch $STATEDIR/portmap.xdr
fi
[ -x /sbin/restorecon ] && /sbin/restorecon $STATEDIR/*.xdr
- log_begin_msg "Starting rpcbind daemon..."
pid=$( pidofproc /sbin/rpcbind )
if [ -n "$pid" ]
then
- log_begin_msg "Already running."
- log_end_msg 0
+ log_action_msg "Already running: rcpbind"
exit 0
fi
+ log_begin_msg "Starting rpcbind daemon..."
start-stop-daemon --start --quiet --oknodo --exec /sbin/rpcbind -- "$@"
pid=$( pidofproc /sbin/rpcbind )
echo -n "$pid" >"$PIDFILE"