ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
62 stars 58 forks source link

Adjust runlevels in dumpconf init.d script #132

Closed frank-heimes closed 2 years ago

frank-heimes commented 2 years ago

Hi, as default start runlevel ("# Default-Start:") the runlevels "0 1 2 3 5 6" are listed in etc/init.d/dumpconf and no default runlevel for stop ("# Default-Stop:").

This is not really correct, therefore lintian (the static analysis tool for Debian packages, used by the Debian and Ubuntu projects) rightly complains about it with: E: s390-tools: init.d-script-starts-in-stop-runlevel etc/init.d/dumpconf 0 E: s390-tools: init.d-script-starts-in-stop-runlevel etc/init.d/dumpconf 6

The needed adjustment/fix is trivial - in etc/init.d/dumpconf: -# Default-Start: 0 1 2 3 5 6 -# Default-Stop: +# Default-Start: 1 2 3 5 +# Default-Stop: 0 6

Please consider this adjustment - thx.

hoeppnerj commented 2 years ago

Thanks for pointing it out. I'll propose a patch internally and see where we end up.

Edit: I've just check the history and it seems it was changed from your proposed change to what we have now with the following comment:

dumpconf should be active at all runlevels:
* Use runlevels 0-6

I'll check the reasoning behind it.

frank-heimes commented 2 years ago

Thx

hoeppnerj commented 2 years ago

After looking a bit more into that, it seems to me that there is more to be cleaned up. For all the scripts that we have in etc/init.d there is a corresponding systemd unit file. They all define WantedBy=multi-user.target. This corresponds to the runlevel 2, 3, 5 of SysV (See also: https://www.freedesktop.org/software/systemd/man/runlevel.html).

Now, your proposal makes total sense in the context of SysV. However, we can even go further and remove all the Init header from those scripts (or even remove some of those scripts entirely). All supported distributions use systemd today and the runlevel definitions in those scripts don't have any meaning anymore, since it's handled by systemd and defined in the corresponding unit files anyway.

I'll clean up our etc/init.d/ files and provide patches.

hoeppnerj commented 2 years ago

For completeness, these are the commits that are a result of resolving this issue (I should've added this issue to all of them, not just the one that changes the header): https://github.com/ibm-s390-linux/s390-tools/commit/508253c66621d8a892e356d0a5ba39221c85fb12 https://github.com/ibm-s390-linux/s390-tools/commit/13fef6dbe03f06ede0ae82e0eabb871fb8895ccd https://github.com/ibm-s390-linux/s390-tools/commit/a177ae24393eb2e4bfce509376b2c9af02ed85d0 https://github.com/ibm-s390-linux/s390-tools/commit/b01ef782f075cce63c7d9b48744c34a2911577a1