[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please stop hating on sysvinit (was Re: do packages depend on lexical order or {daily,weekly,monthly} cron jobs?)



On Sun, Aug 11, 2019 at 10:49:57AM +0200, Vincent Bernat wrote:
>  ❦ 11 août 2019 10:27 +02, Marc Haber <mh+debian-devel@zugschlus.de>:
> > We have, however, failed to make use of that. "systemctl restart" is
> > nearly useless in Debian because a non-negligible part of our daemon
> > packages make systemd think the daemon is running while it is actually
> > not, and systemd does for some reason not to anything in this case.
> >
> > I have watched myself involuntarily changing to a systemctl stop;
> > systemctl start scheme, because this has a way higher chance of doing
> > what I want. I haven't dug in deeply in this matter though.
> 
> systemd cannot guess if a SysV init script should leave a daemon behind
> or not. Therefore, they are converted as "Type=forking", "Restart=no"
> "GuessMainPID=no" and "RemainAfterExit=yes". So, when a daemon stops
> unexpectedly, it is not restarted and "restart" doesn't work because the
> unit is still active.

A SysV init script being naturally a script makes hacking in fixes much
easier, both for the admin and maintainer.  For example, restarting connman
with systemd means no wifi unless you restart twice (or stop, wait, start),
this works with sysvinit:

  restart|force-reload)
        log_daemon_msg "Restarting $DESC"
        do_stop
        sleep 1
        do_start
        log_end_msg $?
        ;;

Yes, this particular case might fail on a pathologically loaded box or with a
very slow chip, but I don't know of a way to ask firmware if something is
still winding down, thus what we ship is probably still sanest.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian is one big family.  Including that weird uncle
⢿⡄⠘⠷⠚⠋⠀ and ultra-religious in-laws.
⠈⠳⣄⠀⠀⠀⠀


Reply to: