[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?

According to
https://www.debian.org/doc/manuals/debian-faq/ch-customizing.en.html#s-booting,
you can create a file in /etc/rc.boot/ with any local scripts to be run
at boot time.

There is no similar directory for shutdown, however. If you need to do
something at shutdown, the best thing to do is to create an initscript.
Copy /etc/init.d/skeleton to /etc/init.d/something (where something is
whatever you want to call it) and edit appropriately. Then run
"update-rc.d" with appropriate arguments. (The next question in the
above FAQ details this).

> 
>    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.)
> 
>    Thanks in advance!
> 
>    kynn

Attachment: signature.asc
Description: Digital signature


Reply to: