Re: shell script at boottime
On Sun, Jul 16, 2000 at 02:51:40PM +0200, Sven Burgener wrote: On Sun, Jul 16, 2000 at 01:55:38PM +0200, Hans wrote: it in /etc/init.d, then make the link /etc/rc2.d/S50boot.sh. Is this the proper way to do this? Thanks for the input. One way of doing it. Note that this only gets run at boot time when the default run level is 2, which happens to be so right now, but might be changed later, so check /etc/rcS.d/README for a better way. And note that it will be run any time the system enters runlevel 2, not just at boottime. Adding the symlink from /etc/rcS.d is the best solution. I don't know the policy if there is any on this topic(?), but you can always have an @reboot entry in root's crontabs. See the Debian Policy Manual, section 3.3. Most packages use scripts named the same as their Debian package name, so you should avoid these when creating your own scripts. One method is to add the prefix local_ to the name of your script. On Sun, Jul 16, 2000 at 10:00:09PM -0400, Michael Soulier wrote: I can't seem to remember the name I saw, but isn't there a tool in Debian for managing these symlinks? If so, will it adapt to manual additions like this? man update-rc.d. Also, most /etc/init.d scripts are marked as conffiles, so apt/dpkg will ask before replacing the file if they detect you've changed it. -- finger for GPG public key. pgpibmbsG9Jsv.pgp Description: PGP signature
Re: shell script at boottime
On Sun, Jul 16, 2000 at 10:00:09PM -0400, Michael Soulier wrote: It'd be better if you put your script in /etc/init.d/myscript.sh and made a /etc/rcS.d/S60myscript.sh symlink pointing to it. I can't seem to remember the name I saw, but isn't there a tool in Debian for managing these symlinks? Yes, try 'update-rc.d'. However, I think installing the package 'file-rc', and editing /etc/runlevel.conf is a better method. YMMV. -- Manoj Victor Mathew (GPG#: 3D96A9B9) Cochin, India.
shell script at boottime
Before I start doing this and mess up big time I want to ask if I'm right. As far as I understood: Scripts run at boottime are located in /etc/init.d Links to these scripts are located in /etc/rc*.d (depending on the runlevel) These links begin with Sxx+scriptname and are processed according to there number. Am I right? What I want to do: I have a small shell script (setting hdparm, aumix, etc) called boot.sh which I want to run when my box boots. I thought of putting it in /etc/init.d, then make the link /etc/rc2.d/S50boot.sh. Is this the proper way to do this? Thanks for the input. Hans
Re: shell script at boottime
On Sun, Jul 16, 2000 at 01:55:38PM +0200, Hans wrote: As far as I understood: Scripts run at boottime are located in /etc/init.d You can't say that. All scripts are in there. Things in /etc/rcS.d/ are run at boot time. (See /etc/rcS.d/README for infos) What's also run at boot time are the things for the default run level. Check your /etc/inittab for that. Links to these scripts are located in /etc/rc*.d (depending on the runlevel) These links begin with Sxx+scriptname and are processed according to there number. Am I right? Yes. What I want to do: I have a small shell script (setting hdparm, aumix, etc) called boot.sh which I want to run when my box boots. I thought of putting it in /etc/init.d, then make the link /etc/rc2.d/S50boot.sh. Is this the proper way to do this? Thanks for the input. One way of doing it. Note that this only gets run at boot time when the default run level is 2, which happens to be so right now, but might be changed later, so check /etc/rcS.d/README for a better way. I don't know the policy if there is any on this topic(?), but you can always have an @reboot entry in root's crontabs. If in any doubt, see /usr/doc/sysvinit/README.runlevels.gz for more infos. It's all documented. HTH Sven -- The program required me to install Windows 95 or better ... ... so I installed Linux.
Re: shell script at boottime
What I want to do: I have a small shell script (setting hdparm, aumix, etc) called boot.sh which I want to run when my box boots. I thought of putting it in /etc/init.d, then make the link /etc/rc2.d/S50boot.sh. Is this the proper way to do this? Thanks for the input. If I remember correctly there is also a way to do this with modutils whereby you can add statements to execute at module insertion time. So if your sound is a module, you can have it run aumix only when sound is loaded. -chris
Re: shell script at boottime
Thanks for the insight. Itmt I found a very easy way to set some parameters at boottime: I amended /etc/init.d/bootmisc.sh and put hdparm and aumix entries at the bottom. Works fine. Hans At 02:51 PM 7/16/00 +0200, Sven Burgener wrote: On Sun, Jul 16, 2000 at 01:55:38PM +0200, Hans wrote: As far as I understood: Scripts run at boottime are located in /etc/init.d You can't say that. All scripts are in there. Things in /etc/rcS.d/ are run at boot time. (See /etc/rcS.d/README for infos) What's also run at boot time are the things for the default run level. Check your /etc/inittab for that. Links to these scripts are located in /etc/rc*.d (depending on the runlevel) These links begin with Sxx+scriptname and are processed according to there number. Am I right? Yes. What I want to do: I have a small shell script (setting hdparm, aumix, etc) called boot.sh which I want to run when my box boots. I thought of putting it in /etc/init.d, then make the link /etc/rc2.d/S50boot.sh. Is this the proper way to do this? Thanks for the input. One way of doing it. Note that this only gets run at boot time when the default run level is 2, which happens to be so right now, but might be changed later, so check /etc/rcS.d/README for a better way. I don't know the policy if there is any on this topic(?), but you can always have an @reboot entry in root's crontabs. If in any doubt, see /usr/doc/sysvinit/README.runlevels.gz for more infos. It's all documented. HTH Sven -- The program required me to install Windows 95 or better ... ... so I installed Linux. --- It's nice to be like, but better by far to get paid -- Liz Phair
Re: shell script at boottime
In article [EMAIL PROTECTED], Hans [EMAIL PROTECTED] wrote: Thanks for the insight. Itmt I found a very easy way to set some parameters at boottime: I amended /etc/init.d/bootmisc.sh and put hdparm and aumix entries at the bottom. Works fine. It works fine until sysvinit comes with a new bootmisc.sh script... It'd be better if you put your script in /etc/init.d/myscript.sh and made a /etc/rcS.d/S60myscript.sh symlink pointing to it. Mike.
Re: shell script at boottime
On 16 Jul 2000, Miquel van Smoorenburg wrote: It works fine until sysvinit comes with a new bootmisc.sh script... It'd be better if you put your script in /etc/init.d/myscript.sh and made a /etc/rcS.d/S60myscript.sh symlink pointing to it. I can't seem to remember the name I saw, but isn't there a tool in Debian for managing these symlinks? If so, will it adapt to manual additions like this? Mike To listen to the words of the learned, and to instill into others the lessons of science, is better than religious exercises. -- Prophet Muhammad (pbuh)