Re: solving the network-manager-in-gnome problem
On 2012-07-30 10:50:17 +0100, Lars Wirzenius wrote:
> I'm writing this on a machine running squeeze, so this may be a bit
> different in later versions, but here's the snippet:
>
> if [ -x /etc/init.d/rsync ]; then
> if dpkg --compare-versions "$oldversion" lt "3.0.7-2"; then
> update-rc.d -f rsync remove
> fi
>
> update-rc.d rsync start 50 2 3 4 5 . >/dev/null
> if [ -x /usr/sbin/invoke-rc.d ]; then
> invoke-rc.d rsync restart
> else
> /etc/init.d/rsync restart
> fi
> fi
>
> This invokes the service ("runs the init.d script") with invoke-rc.d, if
> available. The rsync postscript should not need to check for invoke-rc.d
> anymore, it's been available in a required package for a long time now,
> but it shouldn't matter, either.
It is currently required, but perhaps not in the future, with other
init systems. I suppose that there will be some document saying that
whatever init system is chosen, update-rc.d and invoke-rc.d must be
available.
IMHO, this is not "should not need to check" but "must not check",
because /usr/sbin/invoke-rc.d may not be there if the system is
broken, and in such a case, trying to start the daemon while the
user may have requested to disable it is bad for the security of
the system.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Reply to: