[lsb-discuss] (Re)starting a daemon from the post-install script of an LSB package
Till Kamppeter
till.kamppeter at gmail.com
Tue Feb 13 11:15:25 PST 2007
Hi,
when developing distribution independent printer driver packages, there
came up another problem:
On systems with CUPS 1.1.x the CUPS daemon needs to be restarted after
installing PPD files as otherwise CUPS would not list them.
The problem is that different distributions have different ways to
restart the CUPS daemon:
1. Debian and derivatives (like Ubuntu) have renamed the cups to cupsys
2. Most distributions restart a daemon with "/etc/init.d/<script>
restart", Debian/Ubuntu go another way, citing Colin Watson from Ubuntu:
* Maintainer scripts on Debian/Ubuntu systems must not call init
scripts directly; doing so overrides runlevel constraints, does bad
things if the package is being installed in a chroot, and so on.
They should use the invoke-rc.d program instead, and only fall back
to calling the init script directly if the invoke-rc.d program is
not available. I don't know whether you can deal with that correctly
in an LSB-compliant maintainer script.
3. Another way to restart daemons is "killall -HUP <daemon>", but this
does not work with a daemon which has droppen privileges, like the CUPS
daemon in Ubuntu.
What is the best solution here?
Till
More information about the lsb-discuss
mailing list