start shell script at boot before user logs in

I need to start a shell script at boot before the user even logs in. The script will have 1 parameter needed to run. (Fedora 4)
LVL 1
JPERKS1985Asked:
Who is Participating?
 
giltjrConnect With a Mentor Commented:
put it in /etc/rc.d/rc.local
0
 
ygouthamCommented:
putting a entry in /etc/rc.d/rc.local will run the script as root.  who supplies the parameter???  does the script know by itself. if so, good and if the script does not do any great damage go ahead and since it has all privileges be careful.
0
 
giltjrCommented:
ygoutham does bring up a good security point.  Anything from rc.local is executed as root.  You can use su or sudo to exectue commands as a different user.

You also need to make sure that STDERR/STDOUT is re-directed to a log file.  Otherwise you will not know if they actually did what intended.
0
All Courses

From novice to tech pro — start learning today.