On Mon, 10 May 1999, Lynx {Glenn Jones} wrote:

> Could you explain this run level thing to me in more detail? i am quite a
> linux novice. thx

In /etc/inittab you'll have entries like:

# /sbin/init.d/rc takes care of runlevel handling
#
# runlevel 0 is halt
# runlevel S is single-user
# runlevel 1 is multi-user without network
# runlevel 2 is multi-user with network
# runlevel 3 is multi-user with network and xdm
# runlevel 6 is reboot
l0:0:wait:/sbin/init.d/rc 0
l1:1:wait:/sbin/init.d/rc 1
l2:2:wait:/sbin/init.d/rc 2
l3:3:wait:/sbin/init.d/rc 3
#l4:4:wait:/sbin/init.d/rc 4
#l5:5:wait:/sbin/init.d/rc 5
l6:6:wait:/sbin/init.d/rc 6

I use suse. Debian, redhat, etc. might all work a little different, though my
LinuxPPC (based on redhat) is the same, just with a different path to "rc".

Before those entries is where the default run level is set:

id:3:initdefault:

Your inittab should have a warning for you not to set default to 6, which is
reboot :).

Change the number in there to be whatever you want your default runlevel to
be. For instance, 4. For that the entry for runlevel 4 would need to be
un-"commented out" in my setup.

rc is a shell script, look at how it works. You don't need to edit it. You
need only change your local rc file. It's /sbin/init.d/boot.local on my suse
installs and /etc/rc.d/rc.local on my PPC installs.

Especially if you're a newbie, you should make a backup copy of initialisation
files before making changes, e.g. "cp -ip thisfile thisfile.10May1999". This
way if everything gets hosed all you have to do is to somehow get root mounted
read/write and move the original file back :).

The boot/initialisation process is a good one to understand for any OS. It's
spelled out pretty clearly in unix (provided you look at the initialisation
files and can understand shell scripts), so take advantage of that :). 

ciao,

der.hans

> ------------------------------------------------------------------------------
> A member of the PI-100 Club: 
> 3.1415926535897932384626433832795028841971693993751
> 058209749445923078164062862089986280348253421170679
> 
> On Mon, 10 May 1999, LuftHans wrote:
> 
> > On Mon, 10 May 1999, Lynx {Glenn Jones} wrote:
> > 
> > > Hello,
> > > I have altered my inittab file to allow logins via the serial port, but I
> > > have a couple of questions. First, is it possible to switch the serial
> > > port from not allowing logins (so that it can be hooked to a modem or what
> > > have you) to allowing logins (so it can be hooked to a terminal) with out
> > > changing the inittab each time and rebooting? Also, is it possible to
> > 
> > How about just setting up the shell on the serial as part of another
> > run-level? Both 4 and 5 are currently available in my setup. You change run
> > levels to turn the login on and off.
> > 
> > > disable hardware flow control when using it as a login port? I dont want
> > > to bother with the DTR/CTS etc lines. thanks for the help.
> > 
> > You can include setserial commands in whatever your rc.local mechanism is
> > called. Trigger them by testing for run-level changes.
> > 
> > ciao,
> > 
> > der.hans
> > 
> > > ------------------------------------------------------------------------------
> > > A member of the PI-100 Club: 
> > > 3.1415926535897932384626433832795028841971693993751
> > > 058209749445923078164062862089986280348253421170679
> > > 
> > > 
> > 
> > # +++++++++++=================================+++++++++++ #
> > #                   [EMAIL PROTECTED]                      #
> > #            http://home.pages.de/~lufthans/              #
> > #             I've got a photographic memory,             #
> > #         but I'm lousy photographer. - der.hans          #
> > # ===========+++++++++++++++++++++++++++++++++=========== #
> > 
> 
> 

# +++++++++++=================================+++++++++++ #
#                   [EMAIL PROTECTED]                      #
#            http://home.pages.de/~lufthans/              #
#             I've got a photographic memory,             #
#         but I'm lousy photographer. - der.hans          #
# ===========+++++++++++++++++++++++++++++++++=========== #

Reply via email to