[NTLUG:Discuss] Hosed up my system
Jack-I-Need-a-Job-Snodgrass
idiotboy+ntlug at cybermail.net
Tue Mar 19 19:34:45 CST 2002
Not sure if there is a UNIX Standard. The /etc/inittab from RedHat says
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have
networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
It also lists the 'default' that you want your system to boot to.
The /etc/inittab also lists the terminal sessions that are run
at the different run levels.
As far as the 'programs' that run at the different run levels, there
are a couple of different UNIX standards. ( Don't want to make
it simple or every Windows moron would run UNIX ). RedHat
uses the /etc/rc.d/init.d structure. Start ( and stop ) scripts go
in the /etc/rc.d/init.d directory. Symbolic Links are placed in the
rc3.d, rc1.d, etc directories. These are what are called at the
different run levels.
With redhat, you can use Linuxconf ( Control Service Activity )
to maintain what is started/stopped at the different run levels. They
stopped installing linuxconf by default a little bit back. I still manually
install that RPM so I can use the Control Service Activity ( and network
stuff ).
There is also a command line program called chkconfig which will
let you tell which programs to run at the different run levels.
One last item of note, you can ( and have to some times ) specify the
order that things start. Lower numbers start first. So, you may do your
network with a 10 ( 10network ) and your ssh with a number of 50
(50sshd ) so that your network starts before you try and start your
sshd server. If you did it the other way around, you might get hosed.
Lastly... if you are running lilo and you want to boot into single user
mode you can do
kernel single
instead of
kernel
I've had to do this in the past when I didn't want networking or
something else to start before I booted up.
jack
----- Original Message -----
From: "bryn konti" <bkontr at yahoo.com>
To: <discuss at ntlug.org>
Sent: Tuesday, March 19, 2002 6:46 PM
Subject: Re: [NTLUG:Discuss] Hosed up my system
> Thanks for replying Chris.....the more people explain
> how linux and unix work, the more I understand. I
> have just two more questions on the subject of
> runlevels: What are the differences between unix and
> linux runlevels and is there a standard configuration
> method to add/remove and start/stop the rc scripts in
> various runlevels?
>
>
> --- Chris Cox <cjcox at acm.org> wrote:
> > bryn konti wrote:
> > >
> > > Question: As a technical point what would the
> > > difference be between scripts or programs started
> > in
> > > the background by various runlevels.....they (the
> > > symbolic links to the programs or scripts)are
> > called
> > > daemons if they are referenced to the /etc/init.d
> > > directory or is that incorrect??
> >
> > I suppose the base level definition of daemon is a
> > long running
> > process. In the truest sense, the long running
> > process
> > also does something (daemon being a spirit-being
> > which does things
> > invisibly on behalf of another).
> >
> > Technically, the rc scripts start/stop/manipulate
> > daemons
> > and most notably when transitions between runlevels
> > are made.
> > The rc scripts themselves are not supposed to be
> > long
> > lived processes (shell processes)... and for
> > security, they
> > probably should never be long running.... but they
> > often start
> > long running daemons, which again are usually not
> > shell scripts...
> > but that's not a rule or anything.
> >
> > Regards,
> > Chris
> >
> > _______________________________________________
> > http://www.ntlug.org/mailman/listinfo/discuss
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list