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

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: plug-discuss
Subject: Re: Runlevels and services in Slackware [WAS: Re: BSD vs SysV init scripts]
On Sun, 2005-01-23 at 22:18 -0700, Dennis Kibbe wrote:
> 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.

---
this is pretty much the same on any distro - including linux 1 (or 2 or
3 etc.) in grub/lilo boot

SysV is just more comprehensive. Confusing if you've learned to
manhandle things and simple when you get the idea and the tools.

chkconfig takes advantage of all 'services' by the fact that the startup
script would have the 'numerical' equivalent of where the
daemons/services order in both starting and killing as well as xinetd
stuff such as ipop3, imap, etc.

consider...
# chkconfig --list
spamassassin    0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off
gpm             0:off   1:off   2:off   3:off   4:off   5:off   6:off
kudzu           0:off   1:off   2:off   3:on    4:on    5:on    6:off
firewall        0:off   1:off   2:off   3:off   4:off   5:off   6:off
cups            0:off   1:off   2:on    3:on    4:on    5:on    6:off
sendmail        0:off   1:off   2:on    3:on    4:on    5:on    6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
random          0:off   1:off   2:on    3:on    4:on    5:on    6:off
rawdevices      0:off   1:off   2:off   3:on    4:on    5:on    6:off
apmd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
ipchains        0:off   1:off   2:off   3:off   4:off   5:off   6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
anacron         0:off   1:off   2:on    3:on    4:on    5:on    6:off
ntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
xfs             0:off   1:off   2:on    3:on    4:on    5:on    6:off
portmap         0:off   1:off   2:off   3:on    4:on    5:on    6:off
xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off
autofs          0:off   1:off   2:off   3:on    4:on    5:on    6:off
nfs             0:off   1:off   2:off   3:off   4:off   5:off   6:off
nfslock         0:off   1:off   2:off   3:on    4:on    5:on    6:off
nscd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
clamd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
radvd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
rwhod           0:off   1:off   2:off   3:off   4:off   5:off   6:off
snmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
rhnsd           0:off   1:off   2:off   3:on    4:on    5:on    6:off
ypbind          0:off   1:off   2:off   3:off   4:off   5:off   6:off
isdn            0:off   1:off   2:on    3:on    4:on    5:on    6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
rstatd          0:off   1:off   2:off   3:off   4:off   5:off   6:off
rusersd         0:off   1:off   2:off   3:off   4:off   5:off   6:off
rwalld          0:off   1:off   2:off   3:off   4:off   5:off   6:off
yppasswdd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
ypserv          0:off   1:off   2:off   3:off   4:off   5:off   6:off
ypxfrd          0:off   1:off   2:off   3:off   4:off   5:off   6:off
smb             0:off   1:off   2:off   3:on    4:off   5:off   6:off
winbind         0:off   1:off   2:off   3:off   4:off   5:off   6:off
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
squid           0:off   1:off   2:off   3:off   4:off   5:off   6:off
tux             0:off   1:off   2:off   3:off   4:off   5:off   6:off
named           0:off   1:off   2:on    3:on    4:on    5:on    6:off
arpwatch        0:off   1:off   2:off   3:off   4:off   5:off   6:off
dhcpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
apcupsd         0:off   1:off   2:on    3:on    4:on    5:on    6:off
webmin          0:off   1:off   2:on    3:off   4:off   5:on    6:off
yum             0:off   1:off   2:off   3:off   4:off   5:off   6:off
amavisd         0:off   1:off   2:on    3:on    4:on    5:on    6:off
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
snmptrapd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
sysstat         0:off   1:on    2:on    3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
canna           0:off   1:off   2:on    3:on    4:on    5:on    6:off
vsftpd          0:off   1:off   2:off   3:off   4:off   5:off   6:off
dhcrelay        0:off   1:off   2:off   3:off   4:off   5:off   6:off
spamass-milter  0:off   1:off   2:on    3:on    4:on    5:on    6:off
clamav-milter   0:off   1:off   2:on    3:on    4:on    5:on    6:off
xinetd based services:
        chargen-udp:    off
        chargen:        off
        daytime-udp:    off
        daytime:        off
        echo-udp:       off
        echo:   off
        time-udp:       off
        time:   off
        services:       off
        finger: off
        rexec:  off
        rlogin: off
        rsh:    off
        ntalk:  off
        talk:   off
        telnet: off
        rsync:  off
        imap:   on
        imaps:  off
        ipop2:  off
        ipop3:  on
        pop3s:  off
        cups-lpd:       off


now you can edit things by hand but why bother?

# chkconfig --list saslauthd
saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off


# chkconfig --levels 2345 saslauthd on
would turn it on in those run levels

# chkconfig saslauthd on
would turn it on in all run levels indicated in the SysV script or if
not indicated, all run levels

and beyond the normal daemons...there's the xinetd services...

# chkconfig imaps on
would set disable=no and restarts xinetd

It's a very nice tool - I don't usually bother editing anything
inside /etc/init.d or /etc/xinetd.d by hand (links or otherwise)

Craig


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