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

Re: where to add MOL init stuff in Potato

On Sat, Jul 07, 2001 at 02:00:49PM -0500, Vinai wrote:
> Hi All,
> I just compiled MOL and got it running on my Lombard running Potato
> 2.2r2.
> I want to run a script at boot time so MOL's modules are loaded.  This
> allows non-root users to start MOL. Where would I run the script from ?
> I have it in /usr/bin/startmol_at_boot.  In LinuxPPC's installation, I

never put things in /usr/* except /usr/local.  All your /usr are
belong to dpkg.

your script belongs in /usr/local/sbin (its useless except to root).  

> would just add that line to the end of rc.sysinit.  But where would be
> the cleanest place to put such a call on a Potato system ?

create a new initscript in /etc/init.d and use update-rc.d to add it
to the S runlevel.  

make a copy of /etc/init.d/skeleton and use that as a template.  since
your script isn't really a daemon you may not wish to use
start-stop-daemon, but rather just replace those calls with direct
calls to the script.  

after you have the initscript properly configured (and it has 0755
permissions) run:

update-rc.d molmodules start 99 S .

assuming you called it molmodules.  that will make it start as the
last thing as part of runlevel S (which is run only once per boot, not
at runlevel change which is what you want.)

Ethan Benson

Attachment: pgp_3Cl55SsKU.pgp
Description: PGP signature

Reply to: