LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 05-08-2006, 06:16 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
how to restore the startup scripts after removal


I recently removed the atd service from starting up automatically by giving the following command:
Code:
update-rc.d -f atd remove
Now I want to restore it back just the way the init scripts for atd were setup before giving the above command? How can I do that?
 
Old 05-08-2006, 06:24 PM   #2
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 50
Code:
update-rc.d atd defaults
 
Old 05-08-2006, 06:47 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by mrcheeks
Code:
update-rc.d atd defaults
yeah I was aware of this command but the Number after S/K are different for e.g. when I removed atd the output was:
Code:
root@debian:~# update-rc.d -f atd remove
 Removing any system startup links for /etc/init.d/atd ...
   /etc/rc0.d/K89atd
   /etc/rc1.d/K89atd
   /etc/rc2.d/S89atd
   /etc/rc3.d/S89atd
   /etc/rc4.d/S89atd
   /etc/rc5.d/S89atd
   /etc/rc6.d/K89atd
root@debian:~#
and now when I tried to restore it the output was:
Code:
root@debian:~# update-rc.d atd defaults
 Adding system startup for /etc/init.d/atd ...
   /etc/rc0.d/K20atd -> ../init.d/atd
   /etc/rc1.d/K20atd -> ../init.d/atd
   /etc/rc6.d/K20atd -> ../init.d/atd
   /etc/rc2.d/S20atd -> ../init.d/atd
   /etc/rc3.d/S20atd -> ../init.d/atd
   /etc/rc4.d/S20atd -> ../init.d/atd
   /etc/rc5.d/S20atd -> ../init.d/atd
root@debian:~#
The nuber 89 got changed to 20 i.e. means the order in which this service will start will now be different than what it was previosuly. So therefore I was looking for a way which we can restore the service exactly the way it was.
 
Old 05-09-2006, 01:16 AM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
anyone can explain this mystery????
 
Old 05-09-2006, 02:53 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
Quote:
Originally Posted by kushalkoolwal
anyone can explain this mystery????
No mystery update-rc.d blindly executed what you wanted.

man update-rc.d , look for defaults

This order is a bit tricky to choose, so you should keep the old order in a file or somewhere.

To set it back to 89:
Code:
 update-rc.d atd defaults 89
 
Old 05-09-2006, 12:51 PM   #6
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by nx5000
No mystery update-rc.d blindly executed what you wanted.

man update-rc.d , look for defaults

This order is a bit tricky to choose, so you should keep the old order in a file or somewhere.

To set it back to 89:
Code:
 update-rc.d atd defaults 89
Ahh. I wish update-rc.d could keep a track of this somehow rather the user keeping track of those numbers.....

Nways, thanks for the reply dude.
 
Old 05-10-2006, 01:06 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Sorry for being such a pest. But I really don't feel very intuitive if I have to note down the order number (K20,K59,S89,etc) before I remove the scripts by update-rc.d. Looking at the high quality of the Debian Distribution, I am sure the developers of Debian must have thought of some idea/techniques by which we can restore the scripts in their original order??


Thanks
 
  


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
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 12:55 AM
startup scripts doralsoral Linux - Software 6 01-12-2004 03:46 PM
startup scripts amphion Linux - Newbie 8 03-28-2003 01:39 PM
startup scripts mimi Linux - Newbie 6 04-26-2002 03:09 AM
X Startup Scripts JHuizingh Linux - General 1 09-18-2001 01:02 PM


All times are GMT -5. The time now is 07:51 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration