How to write a script that runs during startup for all users?

If it doesn't fit in another category, ask it here.
Post Reply
cwlee
Posts: 33
Joined: 2004/12/10 15:44:17
Contact:

How to write a script that runs during startup for all users

Post by cwlee » 2005/11/16 15:16:13

I'd like to write a script that runs a few iwconfig commands whenever my linux bootups, regardless of users. Could someone enlighten me on this? Yes, I know I could have used the ifcfg-xxx files, I did, it didn't work for my new wireless client, kept connecting to my neighbor's AP instead of my. Would appreciate greatly if someone could help me on this.

Thanks!

cwlee
Posts: 33
Joined: 2004/12/10 15:44:17
Contact:

Re: How to write a script that runs during startup for all users?

Post by cwlee » 2005/11/17 05:09:13

Answering my own question:

Instead of going into the complicated setting up of scripts with run levels, I could edit the rc.local file [/etc/rc.local]. All I've to do is to add whatever commands that I want to run at the end of the file, and this script would be run last after all the scripts had been executed. Pretty much fitted my needs. Found this answer at the user documentation.

Post Reply

Return to “CentOS 4 - Miscellaneous Questions”