LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-05-2004, 12:40 PM   #1
retiqlum
LQ Newbie
 
Registered: Jan 2004
Posts: 9

Rep: Reputation: 0
Why doesn't my Debian install have a /etc/rc.d directory?


Everything I read tells me to put scripts in /etc/rc.d , but thereisn't one!

Instead I have rc.boot,rc0.d to rc6.d and rcS.d.

Are these for different runlevels? Why can't I find a rc.local script? I'm confused!
 
Old 02-05-2004, 01:36 PM   #2
aclaunch
Member
 
Registered: Sep 2003
Posts: 91

Rep: Reputation: 15
Basically there are 2 systems of init scripts-BSD style and SysV style. Slackware uses a BSD style and most other distros use the SysV style. With the BSD style there is a directory /etc/rc.d/ with the various init scripts-rc.inet, rc.firewall, rc.local, etc. which run at boot. This is controlled by a program called init which reads a file /etc/inittab to determine basic things about the system especially run-level and then passes control to rc.S which actually starts the appropriate run-level, "mounts your filesystems, cleans up certain log directories, initializes Plug and Play devices, loads kernel modules, configures PCMCIA devices, sets up serial ports" (from Slackware manual).

SysV systems have a separate set of scripts linked to each run-level. So there are scripts for run-levels 1-6 each with it's own set of scripts for startup of the network, modules, etc.

You can read about SysV style for Debian here:
http://www.debian.org/doc/debian-policy/ch-opersys.html and for Slackware here: http://www.slackware.com/config/init.php

That said, there should be a "boot.local" file in /etc/init.d/ which is where you put your user scripts to be run at boot.

Good Luck
Alan
 
Old 02-05-2004, 01:39 PM   #3
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
the rc.d directory is a redhat-specific way of doing things.

in Debian, the folder containing all init scripts is /etc/init.d

The policies regarding these scripts are outlined in the Debian Policy Manual, here:

http://www.debian.org/doc/debian-pol...tml#s-sysvinit

Section 9.3

Different names, different directory, same effect.
Should it be standardized? Probably. But you try telling either RH or Debian that.

--Rounan
 
Old 02-05-2004, 01:43 PM   #4
retiqlum
LQ Newbie
 
Registered: Jan 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks! That makes it a lot easier to understand.<n/t>

<n/t>
 
Old 02-24-2004, 12:38 AM   #5
rockee
Member
 
Registered: Feb 2004
Posts: 36

Rep: Reputation: 15
Quote:
Originally posted by Rounan
the rc.d directory is a redhat-specific way of doing things.

in Debian, the folder containing all init scripts is /etc/init.d

The policies regarding these scripts are outlined in the Debian Policy Manual, here:

http://www.debian.org/doc/debian-pol...tml#s-sysvinit

Section 9.3

Different names, different directory, same effect.
Should it be standardized? Probably. But you try telling either RH or Debian that.

--Rounan
I have tried looking at the manual and looking at my /etc/inittab file. The default run level is set to 2, yet when I boot, I am always booting into the X login screen, rather than a shell. It looks like I am botting at run level 3. When I look at the scripts in the "rc2.d" directory and the "rc3.d" directories, it looks like the same ones are there. I haven't touched these scripts. Why should they be the same ones? Shouldn't the ones in "rc2.d" be the non X ones?

I wanted to boot directly into the shell. Should I just delete these scripts from the "rc2.d" directory: S99gdm, S99kdm, S99xdm, or change their names?
 
Old 02-24-2004, 08:00 AM   #6
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
I've got the same thing going on on my debian system - so far as I can tell, there's no distinction between levels 2-5; they're identical.
I'm personally not too concerned with it, since I'm only going to boot one way and I don't care what number's associated with it.

If you want init 2 to be a "pure" shell, then yes, you need to delete the appropriate scripts. Note that what are in your rc#.d directories are symlinks to the scripts in the /etc/init.d directory - so if you want a given script back in any runlevel, you just ln -s /etc/init.d/somescript /etc/rc#.d/S##somescript

Just make a note of what you changed, so if you do break something you can fix it.

--Rounan
 
Old 02-24-2004, 09:43 AM   #7
rockee
Member
 
Registered: Feb 2004
Posts: 36

Rep: Reputation: 15
Quote:
Originally posted by Rounan
I've got the same thing going on on my debian system - so far as I can tell, there's no distinction between levels 2-5; they're identical.
I'm personally not too concerned with it, since I'm only going to boot one way and I don't care what number's associated with it.

If you want init 2 to be a "pure" shell, then yes, you need to delete the appropriate scripts. Note that what are in your rc#.d directories are symlinks to the scripts in the /etc/init.d directory - so if you want a given script back in any runlevel, you just ln -s /etc/init.d/somescript /etc/rc#.d/S##somescript

Just make a note of what you changed, so if you do break something you can fix it.

--Rounan
This may be off the thread, but would you advise "upgrading" from Woody to Sarge?
 
Old 02-24-2004, 09:55 AM   #8
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
That depends. How recent do you want your software?

Woody is rock solid. Like, ROCK solid. Like, install whatever weird, esoteric, CRAZY selection of packages you like, and they WILL work together and give you a stable system. This is why production servers swear by it.
Why are the packages this stable? Because woody has been around for years now, and the only things in it that have changed are bug fixes in packages.
The result? rock solid desktop... with dated packages like KDE 2.2 or a hdparm that still doesn't recognize the -X udma5 option (have to use -X69)

Sarge has MUCH newer packages - not bleeding edge, but you're looking at the current generation of software rather than the two-years-ago version.
The drawback is that some packages are broken. For instance, there currently is no way to install KDE in Sarge. Can't do it. Have to install the Sid (unstable) version if you want KDE.
Which works! Sid and Sarge are close enough that you can often exchange packages between them without problem. But, it does mean that KDE might (on occasion - GASP) CRASH! Happened to me once in 2 months of using it, and I think it was my fault (previous install, still learning the ropes, removed some packages I shouldn't have messed with)

Bottom line:
Sarge has newer software, and is still more stable than Windows. By quite a lot. But it is possible that you'll run into problems.
Woody is solid. all the time. very very very few (if any) exceptions.

... and yes, this should be in the Debian area.

--Rounan
 
Old 02-24-2004, 12:07 PM   #9
rockee
Member
 
Registered: Feb 2004
Posts: 36

Rep: Reputation: 15
Quote:
Originally posted by Rounan
That depends. How recent do you want your software?

Woody is rock solid. Like, ROCK solid. Like, install whatever weird, esoteric, CRAZY selection of packages you like, and they WILL work together and give you a stable system. This is why production servers swear by it.
Why are the packages this stable? Because woody has been around for years now, and the only things in it that have changed are bug fixes in packages.
The result? rock solid desktop... with dated packages like KDE 2.2 or a hdparm that still doesn't recognize the -X udma5 option (have to use -X69)

Sarge has MUCH newer packages - not bleeding edge, but you're looking at the current generation of software rather than the two-years-ago version.
The drawback is that some packages are broken. For instance, there currently is no way to install KDE in Sarge. Can't do it. Have to install the Sid (unstable) version if you want KDE.
Which works! Sid and Sarge are close enough that you can often exchange packages between them without problem. But, it does mean that KDE might (on occasion - GASP) CRASH! Happened to me once in 2 months of using it, and I think it was my fault (previous install, still learning the ropes, removed some packages I shouldn't have messed with)

Bottom line:
Sarge has newer software, and is still more stable than Windows. By quite a lot. But it is possible that you'll run into problems.
Woody is solid. all the time. very very very few (if any) exceptions.

... and yes, this should be in the Debian area.

--Rounan
Thanks.

I prefer "aged" s/w, rather than bleeding edge, so if something goes wrong I can isolate it to what I am doing in the app rather than the OS.

Yet, even with Woody, I am still somewhat surprised that in the install I think I didn't set options to boot to X, but I am. Also, as I have said, in the doc, it indictaes that run level 2 should be booting to a shell, yet I am booting to X. Are these legit bugs?
 
Old 02-24-2004, 12:34 PM   #10
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
I don't know if "bug" is the right word.

This seems to be default Debian behavior.
 
Old 02-24-2004, 12:53 PM   #11
rockee
Member
 
Registered: Feb 2004
Posts: 36

Rep: Reputation: 15
Quote:
Originally posted by Rounan
I don't know if "bug" is the right word.

This seems to be default Debian behavior.
If something is in the doc a certain way and in also that way in the script comments and it doesn't work that way, I define it as a bug. For example, if in the script the default run level is set to 2, and in the doc, "2" should be booting to a shell, yet I boot to X, I think that is a bug. If it said all levels boot to X, that I would agree it's not a bug. My understanding is that we are dealing with "released" s/w and not test software. Is this true?
 
  


Reply



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
Debian 3.1 sarge, Apache and /var/www/images directory fiddelm3742 Linux - Software 7 06-30-2005 11:02 AM
Directory and files don't show in Debian jonr Debian 1 05-17-2005 12:53 AM
latex .sty directory in debian feri79 Linux - Software 2 04-18-2005 12:07 AM
debian installation failed: debootstrap/functions no such file or directory lixy Linux - General 1 01-25-2005 05:55 PM
Is there a directory of debian metapackages? liquigel Debian 4 03-01-2004 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:56 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
Open Source Consulting | Domain Registration