LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to add this to startup? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-add-this-to-startup-195294/)

bahadur 06-19-2004 07:30 AM

how to add this to startup?
 
Hi,

i am trying the single sign on for couple of weeks.

the problem is that every time the system boots up the redhat9.0 system becomes a little late then the windows 2000 domain controller.

so i have to manually run this command to get it in sunc with the domain controller.

as i am using samba 3.0.4 this is the command i use


net time set -S 10.10.1.125

this is the IP of the computer which is the domain controller.

so all i wan is that this command should run at the end of every boot up process.

can any one tell me how to make it a startup shell script and where to put the file?

ppuru 06-19-2004 07:37 AM

you can put it in /etc/rc.local

OR

create a /etc/cron.daily/0ntpdate

/usr/sbin/ntpdate -u clock.redhat.com ... although this clock may not match your Win2K clocks.

bahadur 06-19-2004 07:47 AM

dont have /etc/rc.local
 
i dont have /etc/rc.local in my system

i have

rc
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d
rc.d
rc.local
rc.sysinit

rc.local is not a directory it says.

ppuru 06-19-2004 07:50 AM

Yes, rc.local is a file

edit /etc/rc.local and add your command

net time ...

bahadur 06-19-2004 08:37 AM

ok what about running the script at a particular time
 
thanks it worked

now suppose there is some other script i wan to start up at a particular run level.

like suppose this very script.

how do i do that?

ppuru 06-20-2004 12:54 AM

#cd /etc/rcn.d //where n is the init level of your choice

#cp <your script> S99scriptname
#chmod 755 S99scriptname

bahadur 06-21-2004 07:56 AM

but all of them are softlinks
 
Hi,

ok those directories /etc/rcn.d contains soft links.

where are they pointing to. do i also jhave to make a soft link.?

and what does s99 stand for?

ppuru 06-21-2004 10:59 AM

Snnscriptname or Knnscriptname

S - startup script
K - stop / kill script
nn - to prioritize your script - (make it run after or before other scripts)
scriptname - name of the script you want to run


thedp 10-15-2005 04:03 PM

I tried to place my vnc server in /etc/rc.local and nothing happened, the service did not start what can be the problem?? (I'm using SuSE 8.2 Pro)


All times are GMT -5. The time now is 10:31 PM.