Click to See Complete Forum and Search --> : rc.local in Debian?


mka
01-14-2001, 07:17 PM
In RH there was a file called rc.local that
was run after your run level script was done running. In rc.local you could put programs you wanted run at bootup.

Now that I run Debian I can't find a rc.local file. I'd like to put the hard drive tweak in there and automatically startup portsentry, etc.

Is there a comparable file to rc.local in Debian?

TIA

------------------
mka

George W. Bush: "I know how hard it is for you to put food on your families."

rod
01-14-2001, 07:27 PM
/etc/init.d is what your looking for.

Craig McPherson
01-14-2001, 07:45 PM
Create a file called /etc/init.d/local

Go to /etc/rc?.d, where ? represents the runlevel you boot into... usually 2. Make a symlink like this:

ln -s /etc/init.d/local /etc/rc2.d/S95local

Now, the /etc/init.d/local script will be run whenever you boot into runlevel 2, near the end of the bootup process.

You can make multiple scripts like that if you have different things that need to be run at different times during the bootup process.

mka
01-14-2001, 08:26 PM
Cool, that works great!

I have another question:

Should the files in /etc/rc2.d have 755 rights?

Seems a little wierd to me!

------------------
mka

George W. Bush: "I know how hard it is for you to put food on your families."

Craig McPherson
01-20-2001, 10:44 PM
Originally posted by mka:
Cool, that works great!

I have another question:

Should the files in /etc/rc2.d have 755 rights?

Well, the files in /etc/rc2.d should all be Symlinks, and permissions on symlinks always show as "lrwxrwxrwx" even though they actually take their permissions from the file they link to.

The actual files that they link to, in /etc/init.d, need to be at least mode 700. Group and world permissions don't matter much for them -- a non-root user running one wouldn't get very far anyway because the programs that the scripts call require a person to be root in order to function properly. So 755 is perfectly fine. If you have a firewall script in there or somethign like that that you DON'T want the world to be able to read, then 700 would be fine also... it doesn't really matter.

------------------
http://users.ipa.net/~cmcpher/paminv.gif DEBIAN (http://www.debian.org/) http://users.ipa.net/~cmcpher/paminv.gif
It turns girls into statues!

[This message has been edited by Craig McPherson (edited 20 January 2001).]

mka
01-21-2001, 01:31 AM
Thanks for the input, Craig!


Originally posted by Craig McPherson:
Well, the files in /etc/rc2.d should all be Symlinks, and permissions on symlinks always show as "lrwxrwxrwx" even though they actually take their permissions from the file they link to.

The actual files that they link to, in /etc/init.d, need to be at least mode 700. Group and world permissions don't matter much for them -- a non-root user running one wouldn't get very far anyway because the programs that the scripts call require a person to be root in order to function properly. So 755 is perfectly fine. If you have a firewall script in there or somethign like that that you DON'T want the world to be able to read, then 700 would be fine also... it doesn't really matter.




------------------
mka

George W. Bush: "I know how hard it is for you to put food on your families."