[Pkg-sysvinit-devel] Bug#807311: init-d-script: do_reload_sigusr1 sends sighup, not sigusr1

Robbie Harwood rharwood at club.cc.cmu.edu
Tue Dec 20 23:57:49 UTC 2016


Petter Reinholdtsen <pere at hungry.com> writes:

> Renaming the function will break anyone doing the 'alias' trick, so any
> changes should be done in a backwards compatible way, I believe.
>
> Patches welcome. :)

The approach I was suggesting would look like this:

+ Enable this using
+ RELOAD_SIGNAL=1 # or other signal number
+ alias do_reload=do_reload_signal
+do_reload_signal() {
+    log_daemon_msg "Reloading $DESC configuration files" "$NAME"
+    start-stop-daemon --oknodo --stop --signal $RELOAD_SIGNAL \
+      --quiet --pidfile "$PIDFILE" --exec "$DAEMON"
+    log_end_msg $?
+}

(There could even be a default value for RELOAD_SIGNAL, if desired.)

Once that has landed, I was suggesting sending patches to everyone using
do_reload_sigusr1() right now that look like this:

-alias do_reload=do_reload_sigusr1
+SIGNAL=1
+alias do_reload=do_reload_signal

At which point do_reload_sigusr1 can be safely removed since no one is
using it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20161220/fc6ad7d6/attachment.sig>


More information about the Pkg-sysvinit-devel mailing list