why does init kill these services on runlevel 5

Discussion in 'Linux Networking' started by emekadavid, Jul 31, 2012.

  1. emekadavid

    emekadavid Member Staff Writer

    Messages:
    63
    Likes Received:
    4
    Trophy Points:
    8
    I read from tldp pages on system administration that init starts with a specific run level. My /etc/inittab states that it starts with 5, X11. I then asked less to give me a view of the directory file for runlevel 5 i.e less /etc/rc.d/rc5.d. My question is: I know that if a file starts with K that means it is killed when init starts at that runlevel and when it starts with S the service is started. What puzzles me from the output of rc5.d is that, why should services like networking, apache server, dns server and wifi access client be killed when init starts at runlevel 5? can anyone give me a reason for that? It can help me understand the system better. thanks
    Output of that directory follows. first 30 lines,
    Code:
    less /etc/rc.d/rc5.d | head -n 30
    total 8
    drwxr-xr-x.  2 root root 4096 Jul 27 16:09 ./
    drwxr-xr-x. 10 root root 4096 May  4  2011 ../
    lrwxrwxrwx.  1 root root   16 May  4  2011 K10psacct -> ../init.d/psacct*
    lrwxrwxrwx.  1 root root   19 May  4  2011 K10saslauthd -> ../init.d/saslauthd*
    lrwxrwxrwx.  1 root root   15 May  4  2011 K15httpd -> ../init.d/httpd*
    lrwxrwxrwx.  1 root root   14 May  4  2011 K25sshd -> ../init.d/sshd*
    lrwxrwxrwx.  1 root root   17 May  4  2011 K50dnsmasq -> ../init.d/dnsmasq*
    lrwxrwxrwx.  1 root root   20 May  4  2011 K50netconsole -> ../init.d/netconsole*
    lrwxrwxrwx.  1 root root   17 May  4  2011 K75ntpdate -> ../init.d/ntpdate*
    lrwxrwxrwx.  1 root root   14 May  4  2011 K80fcoe -> ../init.d/fcoe*
    lrwxrwxrwx.  1 root root   16 May  4  2011 K80lldpad -> ../init.d/lldpad*
    lrwxrwxrwx   1 root root   14 Jul  6 07:52 K80sssd -> ../init.d/sssd*
    lrwxrwxrwx   1 root root   24 Jul 27 15:00 K84wpa_supplicant -> ../init.d/wpa_supplicant*
    lrwxrwxrwx.  1 root root   15 May  4  2011 K86cgred -> ../init.d/cgred*
    lrwxrwxrwx.  1 root root   20 May  4  2011 K87multipathd -> ../init.d/multipathd*
    lrwxrwxrwx.  1 root root   21 May  4  2011 K87restorecond -> ../init.d/restorecond*
    lrwxrwxrwx.  1 root root   15 May  4  2011 K89rdisc -> ../init.d/rdisc*
    lrwxrwxrwx.  1 root root   17 May  4  2011 K90network -> ../init.d/network*
    lrwxrwxrwx.  1 root root   18 May  4  2011 K95cgconfig -> ../init.d/cgconfig*
    lrwxrwxrwx   1 root root   19 Jul  6 07:57 K95firstboot -> ../init.d/firstboot*
    lrwxrwxrwx.  1 root root   17 May  4  2011 S00livesys -> ../init.d/livesys*
    lrwxrwxrwx.  1 root root   22 May  4  2011 S02lvm2-monitor -> ../init.d/lvm2-monitor*
    lrwxrwxrwx.  1 root root   16 May  4  2011 S07iscsid -> ../init.d/iscsid*
    lrwxrwxrwx.  1 root root   19 May  4  2011 S08ip6tables -> ../init.d/ip6tables*
    lrwxrwxrwx.  1 root root   18 May  4  2011 S08iptables -> ../init.d/iptables*
    lrwxrwxrwx   1 root root   16 Jul 27 16:09 S11auditd -> ../init.d/auditd*
    lrwxrwxrwx.  1 root root   21 May  4  2011 S11portreserve -> ../init.d/portreserve*
    lrwxrwxrwx.  1 root root   17 May  4  2011 S12rsyslog -> ../init.d/rsyslog*
    lrwxrwxrwx.  1 root root   18 May  4  2011 S13cpuspeed -> ../init.d/cpuspeed*
    


  2. Kerms

    Kerms New Member

    Messages:
    59
    Likes Received:
    12
    Trophy Points:
    0
    Generally, the runlevel doesn't have to be like that; you can change it to anything you want.

    It seems to me that runlevel 5 doesn't want networking, and since no networking, why keep the services that majorly depend on networking alive? That's why it kills stuff like the web, dns and ssh servers.
    My best guess is that, that is what your OS's default setup for runlevel 5; and why is it like that? Who knows.

    the runlevels are states that OS can be in and how it operates.

    I hope I answered your question fully.
  3. emekadavid

    emekadavid Member Staff Writer

    Messages:
    63
    Likes Received:
    4
    Trophy Points:
    8
    yeah. going to read through all the runlevels and see how they compare. i think there is something interesting about the distro and its advocacy of freedom. personally, i do not understand the issues involved but i hope to listen to the communication from that channel. wondering what absolute freedom from proprietary software might mean in a capitalist world. developing world needs it though but how does the developer eat?
    just some thoughts. the distro is blag, based on tenets of free software foundation. am beginning to love the distro
  4. Kerms

    Kerms New Member

    Messages:
    59
    Likes Received:
    12
    Trophy Points:
    0
    Oh, one more thing, the command `runlevel' tells you what runlevel you're currently on.

Share This Page