Click to See Complete Forum and Search --> : Want to write Bootup script
parth
05-07-2003, 12:04 PM
hi guys,
I want write bootup script.I need some answers :)
1]What user does bootup scripts run as.
2]Where does they look for configuration files(Default location).
3]What does thoes functions script do?
Any more thigs I need to know .
Thanks in advance
dungscooperdave
05-07-2003, 12:07 PM
Actually, I've been wondering the same thing myself. I'm looking for a bootup script similar to dos's autoexec.bat where I can place miscellaneous startup commands. I could probably easily find this out by doing a search, but since someone else's already started a thread and it's just about lunch time.... ;)
The boot scripts are located in /etc/rc.d
parth
05-07-2003, 02:08 PM
yes I have mu script there.Don't know where it is looking for configuration files.I mean the deamon I am starting in the script.
thanks for your time
What daemon? And.. have you tried looking its man? maybe there's soem info, like which config files it uses.
parth
05-07-2003, 06:03 PM
In script I am calling to run as deamon .I think which in turn used functions script.
start() {
# Start daemons.
echo -n $"Starting $prog: "
daemon /usr/bin/fetchmail
}
I am doing some this like this to start my fetchmail while boot up.
If I run as root ot looks at /root/.fetchmairc but I am not sure where it is looking when it is booting up. :(
thanks for your time
z0mbix
05-07-2003, 06:12 PM
Just put the location of the script in /etc/rc.local (depends on distro)
bwkaz
05-07-2003, 06:29 PM
Your scripts should be running from your distro's master rc script (it sounds like your distro uses SysV init -- this script is usually named rc, and always runs as a direct child of init, which runs as root -- so your startup scripts always run as root, unless you do some su magic yourself inside them).