:: Re: [DNG] What is an init system?
Inizio della pagina
Delete this message
Reply to this message
Autore: Steve Litt
Data:  
To: dng
Oggetto: Re: [DNG] What is an init system?
Martin Steigerwald said on Tue, 14 May 2024 09:48:12 +0200

>Steve Litt - 11.05.24, 02:45:35 CEST:
>> Sysvinit's process controller is, IMHO, inferior to runit and s6
>> because it requires daemons to background themselves, and its init
>> scripts are huuuuuuuge. Systemd advocates would also include as a
>> disadvantage that sysvinit's process controller can't fork processes
>> in parallel. I don't think that's a significant disadvantage unless a
>> daemon is incredibly slow in starting, in which case, shame on the
>> daemon or shame on the admin (if he botched reverse DNS, for
>> instance).
>
>I'd not consider something like
>
>#!/bin/sh
># kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and
>sourcing. if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
>    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
>fi
>### BEGIN INIT INFO
># Provides:          fio
># Required-Start:    $syslog
># Required-Stop:     $syslog
># Default-Start:     2 3 4 5
># Default-Stop:      0 1 6
># Short-Description: Flexible I/O Tester as service
># Description:       Runs fio as a service to that fio clients can
>connect #                    to it
>### END INIT INFO

>
># Author: Martin Steigerwald […]
>
>DESC="Flexible I/O Tester as service"
>DAEMON=/usr/bin/fio
>DAEMON_ARGS='--server --daemonize /run/fio.pid'
>PIDFILE='/run/fio.pid'
>
>particularly huge.


I wouldn't either, always assuming that init-d-script is reasonably
sized and readable with minimal source imports of its own.

It's too bad you (Martin) didn't write all the other init scripts, some
of which clock in at over 200 lines of hairy shellscripting code.


SteveT

Steve Litt

Autumn 2023 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21