laptop-mode-tools-1.70-alt1 ALT's /usr/sbin/post_service invokes the init-script's condrestart command: service "$1" condrestart but the Debian-style /etc/init.d/laptop-mode doesn't have it (similarly to all other Debian-style init-scripts). I've patched some other Debian-style init-scripts for this ("condrestart") in a simple way: http://git.altlinux.org/gears/o/owamp.git?p=owamp.git;a=commitdiff;h=ae7ac80b0eb4dd255d8918791a5b06099d69305e diff --git a/debian/owamp-server.init b/debian/owamp-server.init index 1a7998b..24951c3 100755 --- a/debian/owamp-server.init +++ b/debian/owamp-server.init @@ -122,8 +122,18 @@ case "$1" in ;; esac ;; + condrestart|condreload) + if "$0" status >/dev/null; then + exec "$0" restart + fi + ;; + condstop) + if "$0" status >/dev/null; then + exec "$0" stop + fi + ;; *) - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload|condrestart|condreload|condstop}" >&2 exit 3 ;; esac A very similar patch: http://git.altlinux.org/gears/t/thermald.git?p=thermald.git;a=commitdiff;h=5e6857d421e2bd21323bb831ec500308cb049130 Perhaps, this trick can be moved into package service (instead of patching each individual package). (I'm going to submit such a FR.)
laptop-mode-tools-1.70-alt2 -> sisyphus: * Thu Oct 06 2016 Andrey Cherepanov <cas@altlinux> 1.70-alt2 - Fix project homepage (ALT #32576) - Support condrestart and condstop in initscript (ALT #32577)