LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-19-2004, 07:30 AM   #1
bahadur
Member
 
Registered: Apr 2004
Distribution: Linux Red Hat
Posts: 141

Rep: Reputation: 15
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?
 
Old 06-19-2004, 07:37 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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.

Last edited by ppuru; 06-19-2004 at 07:40 AM.
 
Old 06-19-2004, 07:47 AM   #3
bahadur
Member
 
Registered: Apr 2004
Distribution: Linux Red Hat
Posts: 141

Original Poster
Rep: Reputation: 15
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.
 
Old 06-19-2004, 07:50 AM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Yes, rc.local is a file

edit /etc/rc.local and add your command

net time ...
 
Old 06-19-2004, 08:37 AM   #5
bahadur
Member
 
Registered: Apr 2004
Distribution: Linux Red Hat
Posts: 141

Original Poster
Rep: Reputation: 15
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?
 
Old 06-20-2004, 12:54 AM   #6
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

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

#cp <your script> S99scriptname
#chmod 755 S99scriptname
 
Old 06-21-2004, 07:56 AM   #7
bahadur
Member
 
Registered: Apr 2004
Distribution: Linux Red Hat
Posts: 141

Original Poster
Rep: Reputation: 15
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?
 
Old 06-21-2004, 10:59 AM   #8
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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


Last edited by ppuru; 06-21-2004 at 11:01 AM.
 
Old 10-15-2005, 04:03 PM   #9
thedp
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware 12.0
Posts: 22

Rep: Reputation: 15
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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
add entry to startup? TomalakBORG SUSE / openSUSE 1 11-22-2005 05:53 PM
how do i add daemons to the startup? snip128 Debian 6 07-15-2005 09:33 AM
how can i add a program to startup with RH 9.0 akohamen Linux - Networking 1 01-16-2005 04:10 AM
How to add program to startup? lamiczka Linux - Newbie 2 02-17-2004 07:37 PM
add route at startup phil1076 Linux - Networking 2 08-26-2003 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration