Package: rpcbind
Version: 0.2.0-3
The "restart" target tries to include -w in the OPTIONS, but when it
runs "$0 start", the script unconditionally clears the value on startup.
I did it using a shell function instead (this is my adapted verrsion of
the portmap script, so it includes some extras from there...):
start () {
log_begin_msg "Starting rpcbind (portmap) daemon..."
pid=$( pidofproc -p /var/run/rpcbind.pid /usr/bin/rpcbind )
if [ -n "$pid" ] ; then
log_begin_msg "Already running."
log_end_msg 0
exit 0
fi
start-stop-daemon --start --quiet --oknodo --exec /usr/bin/rpcbind --
"$@"
log_end_msg $?
mkdir -p /lib/init/rw/sendsigs.omit.d
rm -f /lib/init/rw/sendsigs.omit.d/rpcbind
ln -s /var/run/rpcbind.pid /lib/init/rw/sendsigs.omit.d/rpcbind
}
case "$1" in
start)
start $OPTIONS
;;
stop)
log_begin_msg "Stopping rpcbind (portmap) daemon..."
start-stop-daemon --stop --quiet --oknodo --exec /usr/bin/rpcbind
log_end_msg $?
;;
restart|force-reload)
$0 stop
start -w $OPTIONS
;;
status)
status_of_proc -p /var/run/rpcbind.pid /usr/bin/rpcbind rpcbind && exit
0 || exit $?
;;
*)
log_success_msg "Usage: /etc/init.d/portmap
{start|stop|force-reload|restart|status}"
exit 1
;;
esac
exit 0
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]