[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where to put start-up and shutdown code from `man 4 random`?


On Fri, Jul 11, 2014 at 06:41:49AM -0400, Kynn Jones wrote:
> The documentation in `man 4 random` (**Configuration** section) gives a couple
> of shell-script snippets that it recommends should be added, respectively, "to
> an appropriate script which is run during the Linux start-up sequence" and "to
> an appropriate script which is run during the Linux system shutdown".  (It is
> silent on what those "appropriate scripts" should be.)
> What should these scripts be for a Debian system?

I believe that the "initscripts" package (which you almost certainly
have got installed already) handles this already - if you cast your
eyes over /etc/init.d/urandom you should see similar code.

> Are there standard scripts in which to put such start-up and shutdown code?  Or
> is one supposed to put those snippets in standalone scripts in special
> designated directories (which will ensure that they will be run at the startup
> or shutdown)?  Or something else altogether?
> (In case it matters, I'm using wheezy.)

For wheezy[1], the normal place for startup/shutdown is in /etc/init.d/ -
symlinks will be created from /etc/rcX.d/ as appropriate for each
runlevel (X is a run level in this context).

For simple hacks by the system admin, tweaking /etc/rc.local is also
acceptable - packages are not allowed to interfere with that.

There is a plethora of information available about this -
may be a good starting point.

[1] Let's not get into the whole systemd saga here....

Hope this helps
Karl E. Jorgensen

Reply to: