Sujet : Re: Distros specifically designed for children
De : not (at) *nospam* telling.you.invalid (Computer Nerd Kev)
Groupes : comp.os.linux.miscDate : 31. May 2025, 08:38:03
Autres entêtes
Organisation : Ausics - https://newsgroups.ausics.net
Message-ID : <683ab1da@news.ausics.net>
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 26
User-Agent : tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
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" ...
Sure but I don't find that boilerplate hard to read that. I do find
it hard to look up what all the fields in Systemd services mean,
and the commands to install/enable/inspect them. Like I say if I
were editing lots of them regularly it would be different, but I
use shell scripts much more than I tweak init tasks, so the less
init-specific info required the better.
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.
Except you could have just done this on most sysvinit systems:
echo 'echo 50 > /sys/class/power_supply/BAT0/charge_control_end_threshold' >> /etc/rc.local
(though probably better to have "exit 0" at the end of that
script).
Or the same in Systemd if you have a service that runs
/etc/rc.local. Or maybe that would be sacrilege? Anyway, each to
his own.
-- __ __#_ < |\| |< _#