Forum Home
Press F1
 
Thread ID: 48504 2004-08-25 05:27:00 Linux boot time scripts Growly (6) Press F1
Post ID Timestamp Content User
265109 2004-08-25 05:27:00 Helloooo

Err, is there a file that linux executes upon startup?

My crappy 486 has a NIC that needs to be flipped specifically to 10BaseT every time, but it doesn't happen automatically. I need to issue the ifconfig eth0 inet up command to get it working, so was wondering if I could just tell it to execute this when starting up.

(Similar to autoexec.bat in Windows)

Cheers.
Growly (6)
265110 2004-08-25 05:32:00 Put any command you need into rc.local in /etc/rc.d Graham L (2)
265111 2004-08-25 05:34:00 Thanks very very much :D Growly (6)
265112 2004-08-25 05:38:00 Oh, my mistake - I am running Debian 3.0.

I can't find a single rc.d folder, they are all rc0.d, rc1.d, rc2.d, rc3.d etc.

None of them contain rc.local ....

:S
Growly (6)
265113 2004-08-25 06:16:00 > I can't find a single rc.d folder, they are all
> rc0.d, rc1.d, rc2.d, rc3.d etc.
>
> None of them contain rc.local ....

Looks like Debian doesn't use rc.local. Have a read of the this (www.debian.org) Debian FAQ on bootscripts.

Just for interest, if you look in your rc0.d, rc3.d etc folders you will see the services/processes that are currently set to start or kill at each runlevel - the number after the rc denotes the runlevel, and the capital S (start) means this item will run and a capital K (kill) means this item will not run for that particular runlevel.
Jen C (20)
265114 2004-08-25 06:24:00 AH! They are called bootscripts!

Thanks very much for that info :D
Growly (6)
265115 2004-08-25 06:25:00 Try in /etc/init.d/ ? rc.local isn't a directory --- it's a file. locate rc.local might find it. That's pretty well a standard way to put in "local" requirements withouit risking messing with the carefully buil system rc.xx files. Graham L (2)
265116 2004-08-25 11:04:00 Oh right - yeah I knew it was a file, sorry if it didn't sound like it :D

Thanks very much for that.
Growly (6)
265117 2004-08-25 12:13:00 Throw it in to /etc/init.d/bootmisc.sh

Down the bottom after everything else is best :-)


Chill.
Chilling_Silence (9)
265118 2004-08-27 05:03:00 rc.local seems to be the standard mechanism. Debian have "improved the standard". :_|

You can www.linuxgazette.com/node/view/818] (http:..[url) make your own[/url].

"debian rc.local" to Google finds this and other suggections.
Graham L (2)
1