Runlevels and services in Slackware [WAS: Re: BSD vs SysV in…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Dennis Kibbe
Date:  
To: plug-discuss
Old-Topics: Re: BSD vs SysV init scripts
Subject: Runlevels and services in Slackware [WAS: Re: BSD vs SysV init scripts]
I've started a new thread because I'm not sure I've followed the discussion close enough to understand what's being asked. So I thought I just give some general info about how I *think* things are handled in slackware. Feel free to correct me if you find an error.

You can start Slackware in a different runlevel from the first boot prompt without waiting to get to a command prompt. Just type linux followed by the runlevel you want.

boot:linux 4

The above will take you right to the GUI login screen.

As far as I know runlevel 1 is not a normal "production" mode and would only be used if you had to fix something in a broken system.

You can control the services that run on boot by runing pkgtool and selecting Setup then check the box in front of Services and hit enter. You'll be at a screen where you can turn services on and off at the next boot.

You can also start and stop services directly. So if CUPS isn't running you can start it with:

/etc/rc.d/rc.cups start

and the printer daemon will start up.

Most services are started from the /etc/rc.d/ directory. If you list the contents you'll probably see what you need.

root@tobias:~# ls /etc/rc.d/

rc.0@  rc.M*      rc.bind       rc.font.new*  rc.inet1.conf  rc.local*    rc.serial*    rc.udev*
rc.4*  rc.S*      rc.cups*      rc.hotplug*   rc.inet2*      rc.modules*  rc.sshd*      rc.wireless*
rc.6*  rc.acpid*  rc.dnsmasq    rc.httpd      rc.inetd*      rc.pcmcia*   rc.syslog*    rc.wireless.conf
rc.K*  rc.alsa*   rc.firewall*  rc.inet1*     rc.ip_forward  rc.portmap   rc.sysvinit*


Note that there are script for different runlevels (rc.0, 4, 6, K) and rc.firewall isn't created, you need to create and give the firewall some rules then it will be run from rc.inet2 on boot.

Most network services are handled with /etc/rc.d/rc.inet2 which is well commented (like most Slackware config files) so you should be able to figure things out.

/etc/initab is where you set the default runlevel by editing this line:

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

Changing 3 to 4 will start you up in the GUI

You might also want to edit this line:

# What to do at the "Three Finger Salute".
ca::ctrlaltdel:/sbin/shutdown -t5 -h -a now

As shown above pressing ctrl-alt-del will shut down the system from the command prompt.

As Siri said everything is very straight forward in Slackware. Patrick selects reasonable defaults and then just stays out of your way. Slackware just works.

Hope that helps.

Dennisk

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss