PEACEFUL systemd thread - GNU/Linux

Users browsing this thread: 1 Guest(s)
z3bra
Grey Hair Nixers
(15-06-2017, 02:49 PM)venam Wrote:
(15-06-2017, 02:35 PM)z3bra Wrote: easier than anything else really. No complex variable, no surprise on what will run, no hidden framework to source... Just a shell script, that you can run on its own to test it

However there are two things you are missing:
  • The role of an init system is not limited to the role of a service manager, it's only one feature amongst others it can provide.
  • The role of a service manager is not limited to simply starting the services it might also do the following:
    • Start daemons (whole detachment process)
    • Have some sort of order, be it synchronous and deterministic, or asynchronous dependency based, plus:
      • could be according to a simple list
      • could be according to some dynamic factors/events (socket, devices connected, new mount point, time based(periodic), file system changes, etc..)
    • Control and monitor the daemons (centralized way to do that)
    • Recover in case of crashes
    • Provide debug logs (dumps, traces) in case of crash
    • It could have a centralized log mechanism
    • Integrate some sort of IPC

The init systems I mentioned are indeed not perfect (none of them is actually, which is why we're facing a war of inits).
First of all, I don't think it's the init job to handle services. Its role is to bring up the system. What happens next is irrelevant to the "init".
For services, you're right, today, only systemd can start a service when a special path is mounted, or a socket is created. But is it the right way to do it? In the end, is a mount point semantically different from a "network" service? IMO, they should all be treaten the same, using a mechanism similar to the need(8) idea (see https://web.archive.org/web/200104281211...ot-scripts)

basically, your script could be this (note that mpd flags are random here, I don't know.them):
Code:
need network
need music.nfs
mpd --foreground --musicdir /mount/nfs/music


Messages In This Thread
PEACEFUL systemd thread - by z3bra - 30-10-2016, 05:49 AM
RE: PEACEFUL systemd thread - by jkl - 30-10-2016, 01:05 PM
RE: PEACEFUL systemd thread - by pranomostro - 30-10-2016, 05:17 PM
RE: PEACEFUL systemd thread - by venam - 31-10-2016, 03:43 AM
RE: PEACEFUL systemd thread - by z3bra - 31-10-2016, 10:03 AM
RE: PEACEFUL systemd thread - by evbo - 31-10-2016, 01:51 PM
RE: PEACEFUL systemd thread - by z3bra - 02-11-2016, 05:38 AM
RE: PEACEFUL systemd thread - by evbo - 02-11-2016, 03:17 PM
RE: PEACEFUL systemd thread - by z3bra - 03-11-2016, 01:07 PM
RE: PEACEFUL systemd thread - by TheAnachron - 03-11-2016, 01:45 PM
RE: PEACEFUL systemd thread - by josuah - 03-11-2016, 03:11 PM
RE: PEACEFUL systemd thread - by pranomostro - 03-11-2016, 03:32 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 06:16 AM
RE: PEACEFUL systemd thread - by azk - 15-06-2017, 10:06 AM
RE: PEACEFUL systemd thread - by evbo - 15-06-2017, 12:32 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 02:35 PM
RE: PEACEFUL systemd thread - by venam - 15-06-2017, 02:49 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 03:36 PM
RE: PEACEFUL systemd thread - by venam - 15-06-2017, 03:51 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 04:02 PM
RE: PEACEFUL systemd thread - by venam - 16-06-2017, 01:01 AM
RE: PEACEFUL systemd thread - by z3bra - 16-06-2017, 05:00 AM
RE: PEACEFUL systemd thread - by venam - 16-06-2017, 07:14 AM
RE: PEACEFUL systemd thread - by z3bra - 16-06-2017, 02:14 PM
RE: PEACEFUL systemd thread - by grah - 26-02-2019, 11:50 PM