Sujet : Re: Distros specifically designed for children
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.miscDate : 31. May 2025, 05:41:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <101e19m$ucpf$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
User-Agent : Pan/0.162 (Pokrosvk)
On 31 May 2025 12:46:44 +1000, Computer Nerd Kev wrote:
Heh, yeah but you can see exactly what the sysvinit scripts are
doing.
Not really. What’s the first step to writing a new sysvinit script?
Copy/paste a whole bunch of boilerplate from an existing script. Why?
“Just in case” ...
I tried to write a Systemd service and ran into all the weird
commands and different edits you had to make.
I’ve done several of those. Here’s an example (not one of mine)
<
https://web.archive.org/web/20240711140744/https://list.waikato.ac.nz/archives/list/wlug@list.waikato.ac.nz/thread/BIAW7GY4KGPUGWIIRWNMBE5JSUVT2VWX/>
which is instructive because of its simplicity: it shows how systemd
can really make things easier to express than sysvinit.
Personally, all the ones I’ve done have been quite small -- less than
a dozen lines each. And each line was put in because it had a purpose
that I understood.
The one pitfall I did encounter was the difference between “After=”
and “Requires=” lines: one specifies timing, the other specifies
dependency, and if you want both, you need to specify both. ;)