- Posts: 45
- Thank you received: 0
Startup Script help
19 years 10 months ago #6769
by jacko0
Startup Script help was created by jacko0
Hi,
I need to run a command when my Redhat 9 boots.
I have no idea where to put it!
I think it might be somthing to do with a file called RC, but there are lots of rc files!
Can anyone help
Thanks
Jacko
I need to run a command when my Redhat 9 boots.
I have no idea where to put it!
I think it might be somthing to do with a file called RC, but there are lots of rc files!
Can anyone help
Thanks
Jacko
19 years 10 months ago #6773
by nske
Replied by nske on topic Re: Startup Script help
place it in /etc/rc.local and verify there is a link for it in /etc/rc3.d
(i.e. ls -o /etc/rc3.d/|grep rc.local)
(i.e. ls -o /etc/rc3.d/|grep rc.local)
19 years 10 months ago #6857
by jacko0
Replied by jacko0 on topic Re: Startup Script help
Hi
Thanks for the help, i put it in /etc/rc.local and now it works!
But why would i want to put a link in /etc/rc3.d ?
Thanks for the help, i put it in /etc/rc.local and now it works!
But why would i want to put a link in /etc/rc3.d ?
19 years 10 months ago #6861
by nske
Replied by nske on topic Re: Startup Script help
Because everything that exists on /etc/rcX.d is being executed upon entering the X runlevel (according to some parameteres that come from the filename, S for start, K for stop, and the number that represents the relative execution sequence). Thus if there was not a link for rc.local in rc3.d then it wouldn't be executed upon entering runlevel 3 (which I think is the default - multiuser mode for redhat).
This is the SysV type of startup script management that redhat uses, I personally find more straitforward the bsd type.
This is the SysV type of startup script management that redhat uses, I personally find more straitforward the bsd type.
19 years 9 months ago #6879
by jacko0
Replied by jacko0 on topic Re: Startup Script help
This is my rc.local and I have not modified any other rc.x files.
Are you sure i need to modify the other rc.x files???
thanks
Jacko
[root@mrgreedy etc]# more rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
echo " "
echo "Starting Teamspeak Deamon"
echo " "
cd /home/tsuser/tss2_rc2/
./teamspeak2-server_startscript start
Are you sure i need to modify the other rc.x files???
thanks
Jacko
[root@mrgreedy etc]# more rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
echo " "
echo "Starting Teamspeak Deamon"
echo " "
cd /home/tsuser/tss2_rc2/
./teamspeak2-server_startscript start
19 years 9 months ago #6881
by nske
Replied by nske on topic Re: Startup Script help
I didn't say you need to modify, only to verify that a link for rc.local exists in the proper place (most likely /etc/rc3.d). Since you said it works, it propably exists, so you don't have to do anything else.
Time to create page: 0.128 seconds