LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-12-2004, 05:43 AM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
Is there any way to temporarily prevent a script from loading in certain runlevel?


How should I go about disabling a script from loading in a certain runlevel (eg. runlevel 2) without deleting off the symbolic in /etc/rc2.d ?aka Redhat's chkconfig command.

Thanks !
 
Old 04-12-2004, 05:53 AM   #2
EcceVery
Member
 
Registered: Apr 2004
Location: Sweden
Distribution: Gentoo, Debian, CentOS
Posts: 61

Rep: Reputation: 15
I don't know if this helps you, but if you rename the files staring with a capital 'S' to a capital 'K' in the /etc/rc2.d directory they wont launch at that runlevel. Example:

S99xdm -> K99xdm

would prevent xdm from starting.
 
Old 04-12-2004, 09:35 AM   #3
sims
Member
 
Registered: Mar 2004
Location: Australia
Distribution: Debian, Ubuntu
Posts: 55

Rep: Reputation: 15
You can also use update-rc.d. If you for example want to start xdm only in runlevel 3:

# remove current startup links
update-rc.d -f xdm remove

# create new links
update-rc.d xdm start 99 3 . stop 99 0 1 2 4 5 6 .

man update-rc.d ! =)
 
Old 04-12-2004, 09:57 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
A program designed to do just that is: chkconfig

chkconfig [--level levels] name <on|off|reset>

Typing chkconfig --list name will display on which run levels a service runs.

Last edited by jschiwal; 04-12-2004 at 09:59 AM.
 
Old 04-12-2004, 10:01 AM   #5
sims
Member
 
Registered: Mar 2004
Location: Australia
Distribution: Debian, Ubuntu
Posts: 55

Rep: Reputation: 15
jschiwal: Ehm, chkconfig in debian? Don't think so...
 
Old 04-12-2004, 10:12 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Sorry, I didn't read the question carefully enough.
 
  


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
Prevent lp and parport module from loading jlinkels Linux - Hardware 0 10-16-2005 08:49 PM
In suse, how does one prevent network adapters' drivers from loading during boottime? albertt Linux - Networking 3 01-13-2005 11:37 PM
Prevent kernel options from loading slowly Linux - Software 3 10-07-2004 11:54 PM
howto prevent loading alsa mixer error in kernel-2xx moonloader Slackware 2 08-20-2004 08:23 PM
How to prevent loading the default driver(b44) simon780 Slackware 3 03-30-2004 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration