On Wed, Mar 09, 2016 at 10:10:29AM +0000, Mark Rogers wrote:
On 8 March 2016 at 14:09, Chris Green cl@isbd.net wrote:
Won't *any* executable file in the appropriate /etc/rcX.d directory get executed for that run level?
I honestly don't know - and it's a subject where there's so much documentation that it's hard to see the wood for the trees!
:-)
My understanding is that the script should at least respond to start/stop parameters but I might be wrong - especially as in this case where there is no service being started, i just want some code to run once to initialise some scripts.
Yes, I think you're right. All the scripts are just symbolic links to the scripts in /etc/init.d and those do expect 'start', 'stop', 'restart' etc. Presumably init (or whatever has replaced it) runs the scripts with an appropriate 'start' or 'stop' depending on the run-level.
So if you create a script that allows a 'start' parameter (just ignores it) and put it in the appropriate /etc/rcX.d I think that should work.
And then systemd confuses things further (or does it?).
Probably! However I think it still allows for 'legacy' code to work.