what is init.d?
Post date: May 04, 2013 4:33:32 PM
The init.ddirectory contains a number of start/stop scripts for various services on your system.
when you look at the /etc directory you will find directories that are in the form rc#.d (Where # is a number reflects a specific initialization level - from 0 to 6). Within each of these directories is a number of other scripts that control processes. These scripts will either begin with a "K" or an "S". All "K" scripts are run before "S" scripts. And depending upon where the scripts are located will determine when the scripts initiate. Between the directories the system services work together like a well-oiled machine. But there are times when you need to start or stop a process cleanly and without using the kill or killall commands. That is where the /etc/init.ddirectory comes in handy.
[sachi@sachi etc]$ ls -l *.d
lrwxrwxrwx. 1 root root 11 Apr 21 07:22 init.d -> rc.d/init.d
lrwxrwxrwx. 1 root root 10 Apr 21 07:24 rc0.d -> rc.d/rc0.d
lrwxrwxrwx. 1 root root 10 Apr 21 07:24 rc1.d -> rc.d/rc1.d
lrwxrwxrwx. 1 root root 10 Apr 21 07:24 rc2.d -> rc.d/rc2.d
lrwxrwxrwx. 1 root root 10 Apr 21 07:24 rc3.d -> rc.d/rc3.d
lrwxrwxrwx. 1 root root 10 Apr 21 07:24 rc4.d -> rc.d/rc4.d
lrwxrwxrwx. 1 root root 10 Apr 21 07:24 rc5.d -> rc.d/rc5.d
lrwxrwxrwx. 1 root root 10 Apr 21 07:24 rc6.d -> rc.d/rc6.d
bash_completion.d:
total 120
-rw-r--r--. 1 root root 1158 May 21 2011 abrt-cli.bash
-rw-r--r--. 1 root root 45281 May 25 2011 git
-rw-r--r--. 1 root root 2516 Apr 7 2011 gvfs-bash-completion.sh
-rw-r--r--. 1 root root 2592 Apr 7 2011 pk-completion.bash
-rw-r--r--. 1 root root 39423 May 26 2009 subversion
-rw-r--r--. 1 root root 10082 May 21 2011 yum.bash
-rw-r--r--. 1 root root 8031 Feb 18 14:22 yum-utils.bash
chkconfig.d:
total 0
cron.d:
total 12
-rw-r--r--. 1 root root 113 Mar 29 2011 0hourly
-rw-r--r--. 1 root root 108 May 20 2011 raid-check
-rw-r--r--. 1 root root 251 May 20 2011 sysstat
depmod.d:
total 4
-rw-r--r--. 1 root root 116 Dec 2 2010 dist.conf
dnsmasq.d:
total 0
dracut.conf.d:
total 0
event.d:
total 12
-rw-r--r--. 1 root root 146 Jan 25 2011 ck-log-system-restart
-rw-r--r--. 1 root root 141 Jan 25 2011 ck-log-system-start
-rw-r--r--. 1 root root 137 Jan 25 2011 ck-log-system-stop
ls: cannot open directory ipsec.d: Permission denied
latrace.d:
total 148
-rw-r--r--. 1 root root 392 Jul 24 2010 ctype.conf
-rw-r--r--. 1 root root 825 Jul 24 2010 dirent.conf
-rw-r--r--. 1 root root 417 Jul 24 2010 dlfcn.conf
-rw-r--r--. 1 root root 643 Jul 24 2010 fcntl.conf
-rw-r--r--. 1 root root 273 Jul 24 2010 getopt.conf
-rw-r--r--. 1 root root 655 Jul 24 2010 inet.conf
-rw-r--r--. 1 root root 68 Jul 24 2010 ioctl.conf
-rw-r--r--. 1 root root 651 Jul 24 2010 libintl.conf
-rw-r--r--. 1 root root 646 Jul 24 2010 libio.conf
-rw-r--r--. 1 root root 286 Jul 24 2010 locale.conf
-rw-r--r--. 1 root root 292 Jul 24 2010 misc.conf
-rw-r--r--. 1 root root 976 Jul 24 2010 mman.conf
-rw-r--r--. 1 root root 11029 Jul 24 2010 ncurses.conf
-rw-r--r--. 1 root root 3937 Jul 24 2010 netdb.conf
-rw-r--r--. 1 root root 7686 Jul 24 2010 pthread.conf
-rw-r--r--. 1 root root 869 Jul 24 2010 pwd.conf
-rw-r--r--. 1 root root 2289 Jul 24 2010 resource.conf
-rw-r--r--. 1 root root 2626 Jul 24 2010 signal.conf
-rw-r--r--. 1 root root 3365 Jul 24 2010 socket.conf
-rw-r--r--. 1 root root 1642 Jul 24 2010 stat.conf
-rw-r--r--. 1 root root 3943 Jul 24 2010 stdio.conf
-rw-r--r--. 1 root root 6327 Jul 24 2010 stdlib.conf
-rw-r--r--. 1 root root 2834 Jul 24 2010 string.conf
drwxr-xr-x. 3 root root 4096 Apr 21 07:29 sysdeps
-rw-r--r--. 1 root root 198 Jul 24 2010 syslog.conf
-rw-r--r--. 1 root root 934 Jul 24 2010 term.conf
-rw-r--r--. 1 root root 671 Jul 24 2010 termios.conf
-rw-r--r--. 1 root root 1642 Jul 24 2010 time.conf
-rw-r--r--. 1 root root 472 Jul 24 2010 typedefs.conf
-rw-r--r--. 1 root root 4399 Jul 24 2010 unistd.conf
-rw-r--r--. 1 root root 564 Jul 24 2010 utmp.conf
-rw-r--r--. 1 root root 419 Jul 24 2010 wait.conf
ld.so.conf.d:
total 28
-rw-r--r--. 1 root root 17 Jul 30 2010 atlas-x86_64.conf
-r--r--r--. 1 root root 324 May 25 2011 kernel-2.6.32-100.34.1.el6uek.x86_64.conf
-r--r--r--. 1 root root 324 May 20 2011 kernel-2.6.32-131.0.15.el6.x86_64.conf
-rw-r--r--. 1 root root 17 Jan 27 2011 mysql-x86_64.conf
-rw-r--r--. 1 root root 42 Apr 24 17:02 oracle.conf
-rw-r--r--. 1 root root 22 Jul 25 2010 qt-x86_64.conf
-rw-r--r--. 1 root root 21 Apr 2 19:45 xulrunner-64.conf
logrotate.d:
total 48
-rw-r--r--. 1 root root 71 Mar 29 2011 cups
-rw-r--r--. 1 root root 103 May 20 2011 dracut
-rw-r--r--. 1 root root 185 May 21 2011 httpd
-rw-r--r--. 1 root root 162 May 22 2011 libvirtd.lxc
-rw-r--r--. 1 root root 163 May 22 2011 libvirtd.qemu
-rw-r--r--. 1 root root 136 Jul 7 2010 ppp
-rw-r--r--. 1 root root 329 Jul 7 2010 psacct
-rw-r--r--. 1 root root 219 May 22 2011 sssd
-rw-r--r--. 1 root root 228 Mar 30 2011 syslog
-rw-r--r--. 1 root root 32 Apr 8 2010 up2date
-rw-r--r--. 1 root root 100 Jul 8 2010 wpa_supplicant
-rw-r--r--. 1 root root 100 May 21 2011 yum
lsb-release.d:
total 0
-rw-r--r--. 1 root root 0 Apr 3 2011 core-4.0-amd64
-rw-r--r--. 1 root root 0 Apr 3 2011 core-4.0-noarch
-rw-r--r--. 1 root root 0 Apr 3 2011 graphics-4.0-amd64
-rw-r--r--. 1 root root 0 Apr 3 2011 graphics-4.0-noarch
-rw-r--r--. 1 root root 0 Apr 3 2011 printing-4.0-amd64
-rw-r--r--. 1 root root 0 Apr 3 2011 printing-4.0-noarch
makedev.d:
total 140
-rw-r--r--. 1 root root 359 Jul 24 2010 00macros
-rw-r--r--. 1 root root 6213 Jul 24 2010 01alsa
-rw-r--r--. 1 root root 302 Jul 24 2010 01cdrom
-rw-r--r--. 1 root root 37 Jul 24 2010 01console
-rw-r--r--. 1 root root 242 Jul 24 2010 01ftape
-rw-r--r--. 1 root root 218 Jul 24 2010 01generic
-rw-r--r--. 1 root root 141 Jul 24 2010 01ia64
-rw-r--r--. 1 root root 210 Jul 24 2010 01ibcs
-rw-r--r--. 1 root root 256 Jul 24 2010 01ide
-rw-r--r--. 1 root root 96 Jul 24 2010 01ipfilter
-rw-r--r--. 1 root root 90 Jul 24 2010 01isdn
-rw-r--r--. 1 root root 619 Jul 24 2010 01linux1394
-rw-r--r--. 1 root root 27779 Jul 24 2010 01linux-2.6.x
-rw-r--r--. 1 root root 377 Jul 24 2010 01mouse
-rw-r--r--. 1 root root 42 Jul 24 2010 01qic
-rw-r--r--. 1 root root 113 Jul 24 2010 01raid
-rw-r--r--. 1 root root 2325 Jul 24 2010 01redhat
-rw-r--r--. 1 root root 1915 Jul 24 2010 01s390
-rw-r--r--. 1 root root 271 Jul 24 2010 01sound
-rw-r--r--. 1 root root 476 Jul 24 2010 01std
-rw-r--r--. 1 root root 124 Jul 24 2010 01undocumented
-rw-r--r--. 1 root root 163 Jul 24 2010 01v4l
-rw-r--r--. 1 root root 480 Jul 24 2010 02cciss
-rw-r--r--. 1 root root 902 Jul 24 2010 02dac960
-rw-r--r--. 1 root root 464 Jul 24 2010 02ida
-rw-r--r--. 1 root root 11324 Jul 24 2010 02linux-2.6.x
modprobe.d:
total 36
-rw-r--r--. 1 root root 52 Apr 21 07:20 anaconda.conf
-rw-r--r--. 1 root root 884 May 20 2011 blacklist.conf
-rw-r--r--. 1 root root 25 May 24 2011 blacklist-kvm.conf
-rw-r--r--. 1 root root 382 Dec 2 2010 dist-alsa.conf
-rw-r--r--. 1 root root 5596 Dec 2 2010 dist.conf
-rw-r--r--. 1 root root 473 Dec 2 2010 dist-oss.conf
-rw-r--r--. 1 root root 30 Jul 2 2010 openfwwf.conf
-rw-r--r--. 1 root root 49 Apr 21 17:33 vmware-fuse.conf
oddjobd.conf.d:
total 8
-rw-r--r--. 1 root root 1203 Mar 30 2011 oddjobd-introspection.conf
-rw-r--r--. 1 root root 1315 Jan 27 2010 oddjobd-mkhomedir.conf
pam.d:
total 208
-rw-r--r--. 1 root root 272 Mar 29 2011 atd
-rw-r--r--. 1 root root 97 May 20 2011 authconfig
-rw-r--r--. 1 root root 97 May 20 2011 authconfig-gtk
-rw-r--r--. 1 root root 97 May 20 2011 authconfig-tui
-rw-r--r--. 1 root root 192 May 21 2011 chfn
-rw-r--r--. 1 root root 192 May 21 2011 chsh
-rw-r--r--. 1 root root 232 Mar 30 2011 config-util
-rw-r--r--. 1 root root 293 Mar 29 2011 crond
-r--r--r--. 1 root root 146 Mar 29 2011 cups
-rw-r--r--. 1 root root 71 Jan 27 2011 cvs
-rw-r--r--. 1 root root 115 Jul 4 2010 eject
lrwxrwxrwx. 1 root root 19 Apr 21 07:30 fingerprint-auth -> fingerprint-auth-ac
-rw-r--r--. 1 root root 659 Apr 21 07:30 fingerprint-auth-ac
-rw-r--r--. 1 root root 708 Mar 28 2011 gdm
-rw-r--r--. 1 root root 480 Mar 28 2011 gdm-autologin
-rw-r--r--. 1 root root 489 Mar 28 2011 gdm-fingerprint
-rw-r--r--. 1 root root 701 Mar 28 2011 gdm-password
-rw-r--r--. 1 root root 485 Nov 19 2010 gnome-screensaver
-rw-r--r--. 1 root root 147 Oct 5 2009 halt
-rw-r--r--. 1 root root 70 May 20 2011 ksu
-rw-r--r--. 1 root root 728 May 21 2011 login
-rw-r--r--. 1 root root 172 Apr 4 2011 newrole
-rw-r--r--. 1 root root 154 Mar 30 2011 other
-rw-r--r--. 1 root root 146 Jul 7 2010 passwd
lrwxrwxrwx. 1 root root 16 Apr 21 07:30 password-auth -> password-auth-ac
-rw-r--r--. 1 root root 896 Apr 21 07:30 password-auth-ac
-rw-r--r--. 1 root root 155 Apr 19 2011 polkit-1
-rw-r--r--. 1 root root 71 May 20 2011 postgresql
-rw-r--r--. 1 root root 147 Oct 5 2009 poweroff
-rw-r--r--. 1 root root 144 Jul 7 2010 ppp
-rw-r--r--. 1 root root 147 Oct 5 2009 reboot
-rw-r--r--. 1 root root 613 May 21 2011 remote
-rw-r--r--. 1 root root 97 Apr 8 2010 rhn_register
-rw-r--r--. 1 root root 167 Apr 4 2011 run_init
-rw-r--r--. 1 root root 143 Mar 29 2011 runuser
-rw-r--r--. 1 root root 105 Mar 29 2011 runuser-l
-rw-r--r--. 1 root root 145 Jul 8 2010 setup
lrwxrwxrwx. 1 root root 17 Apr 21 07:30 smartcard-auth -> smartcard-auth-ac
-rw-r--r--. 1 root root 711 Apr 21 07:30 smartcard-auth-ac
lrwxrwxrwx. 1 root root 25 Apr 21 07:24 smtp -> /etc/alternatives/mta-pam
-rw-r--r--. 1 root root 76 Apr 6 2011 smtp.postfix
-rw-r--r--. 1 root root 575 May 20 2011 sshd
-rw-r--r--. 1 root root 341 May 20 2011 ssh-keycat
-rw-r--r--. 1 root root 487 Mar 29 2011 su
-rw-r--r--. 1 root root 202 May 20 2011 sudo
-rw-r--r--. 1 root root 187 May 20 2011 sudo-i
-rw-r--r--. 1 root root 137 Mar 29 2011 su-l
lrwxrwxrwx. 1 root root 14 Apr 21 07:30 system-auth -> system-auth-ac
-rw-r--r--. 1 root root 937 Apr 21 07:30 system-auth-ac
-rw-r--r--. 1 root root 97 May 20 2011 system-config-authentication
-rw-r--r--. 1 root root 97 Dec 20 2010 system-config-date
-rw-r--r--. 1 root root 97 Nov 20 2010 system-config-kdump
-rw-r--r--. 1 root root 97 Nov 20 2010 system-config-keyboard
-rw-r--r--. 1 root root 97 Dec 30 2010 system-config-network
-rw-r--r--. 1 root root 97 Dec 30 2010 system-config-network-cmd
-rw-r--r--. 1 root root 118 May 20 2011 system-config-users
lrwxrwxrwx. 1 root root 12 Apr 21 07:24 uln_register -> rhn_register
-rw-r--r--. 1 root root 163 May 22 2011 xserver
popt.d:
total 0
prelink.conf.d:
total 0
profile.d:
total 76
-rw-r--r--. 1 root root 1133 Mar 29 2011 colorls.csh
-rw-r--r--. 1 root root 1143 Mar 29 2011 colorls.sh
-rw-r--r--. 1 root root 80 Jan 27 2011 cvs.csh
-rw-r--r--. 1 root root 78 Jan 27 2011 cvs.sh
-rw-r--r--. 1 root root 192 Mar 29 2011 glib2.csh
-rw-r--r--. 1 root root 192 Mar 29 2011 glib2.sh
-rw-r--r--. 1 root root 58 May 20 2011 gnome-ssh-askpass.csh
-rw-r--r--. 1 root root 70 May 20 2011 gnome-ssh-askpass.sh
-rw-r--r--. 1 root root 1741 May 21 2011 lang.csh
-rw-r--r--. 1 root root 2706 May 21 2011 lang.sh
-rw-r--r--. 1 root root 122 May 4 2010 less.csh
-rw-r--r--. 1 root root 108 May 4 2010 less.sh
-rw-r--r--. 1 root root 990 Jul 25 2010 qt.csh
-rw-r--r--. 1 root root 933 Jul 25 2010 qt.sh
-rw-r--r--. 1 root root 2142 Dec 3 2010 udisks-bash-completion.sh
-rw-r--r--. 1 root root 97 Mar 30 2011 vim.csh
-rw-r--r--. 1 root root 269 Mar 30 2011 vim.sh
-rw-r--r--. 1 root root 161 Apr 30 2010 which2.csh
-rw-r--r--. 1 root root 169 Apr 30 2010 which2.sh
rc.d:
total 60
drwxr-xr-x. 2 root root 4096 Apr 22 13:43 init.d
-rwxr-xr-x. 1 root root 2617 May 21 2011 rc
drwxr-xr-x. 2 root root 4096 Apr 22 13:43 rc0.d
drwxr-xr-x. 2 root root 4096 Apr 22 13:43 rc1.d
drwxr-xr-x. 2 root root 4096 Apr 22 13:43 rc2.d
drwxr-xr-x. 2 root root 4096 Apr 22 13:43 rc3.d
drwxr-xr-x. 2 root root 4096 Apr 22 13:43 rc4.d
drwxr-xr-x. 2 root root 4096 Apr 26 20:46 rc5.d
drwxr-xr-x. 2 root root 4096 Apr 22 13:43 rc6.d
-rwxr-xr-x. 1 root root 220 May 21 2011 rc.local
-rwxr-xr-x. 1 root root 19546 May 21 2011 rc.sysinit
report.d:
total 16
-rw-r--r--. 1 root root 219 Apr 3 2011 ftp.conf
-rw-r--r--. 1 root root 132 Apr 3 2011 localsave.conf
-rw-r--r--. 1 root root 890 Apr 3 2011 RHEL.conf
-rw-r--r--. 1 root root 281 Apr 3 2011 scp.conf
rwtab.d:
total 4
-rw-r--r--. 1 root root 18 May 22 2011 sssd
sane.d:
total 316
-rw-r--r--. 1 root root 25 Jul 25 2010 abaton.conf
-rw-r--r--. 1 root root 14 Jul 25 2010 agfafocus.conf
-rw-r--r--. 1 root root 24 Jul 25 2010 apple.conf
-rw-r--r--. 1 root root 26 Jul 25 2010 artec.conf
-rw-r--r--. 1 root root 4140 Jul 25 2010 artec_eplus48u.conf
-rw-r--r--. 1 root root 543 Jul 25 2010 avision.conf
-rw-r--r--. 1 root root 29 Jul 25 2010 bh.conf
-rw-r--r--. 1 root root 193 Jul 25 2010 canon630u.conf
-rw-r--r--. 1 root root 35 Jul 25 2010 canon.conf
-rw-r--r--. 1 root root 2834 Jul 25 2010 canon_dr.conf
-rw-r--r--. 1 root root 1160 Jul 25 2010 canon_pp.conf
-rw-r--r--. 1 root root 509 Jul 25 2010 cardscan.conf
-rw-r--r--. 1 root root 754 Jul 25 2010 coolscan2.conf
-rw-r--r--. 1 root root 754 Jul 25 2010 coolscan3.conf
-rw-r--r--. 1 root root 34 Jul 25 2010 coolscan.conf
-rw-r--r--. 1 root root 984 Jul 25 2010 dc210.conf
-rw-r--r--. 1 root root 984 Jul 25 2010 dc240.conf
-rw-r--r--. 1 root root 704 Jul 25 2010 dc25.conf
-rw-r--r--. 1 root root 492 Jul 25 2010 dell1600n_net.conf
-rw-r--r--. 1 root root 682 Jul 25 2010 dll.conf
drwxr-xr-x. 2 root root 4096 Jul 25 2010 dll.d
-rw-r--r--. 1 root root 12 Jul 25 2010 dmc.conf
-rw-r--r--. 1 root root 1378 Jul 25 2010 epjitsu.conf
-rw-r--r--. 1 root root 376 Jul 25 2010 epson2.conf
-rw-r--r--. 1 root root 793 Jul 25 2010 epson.conf
-rw-r--r--. 1 root root 1679 Jul 25 2010 fujitsu.conf
-rw-r--r--. 1 root root 1157 Jul 25 2010 genesys.conf
-rw-r--r--. 1 root root 1149 Jul 25 2010 gphoto2.conf
-rw-r--r--. 1 root root 7792 Jul 25 2010 gt68xx.conf
-rw-r--r--. 1 root root 396 Jul 25 2010 hp3900.conf
-rw-r--r--. 1 root root 76 Jul 25 2010 hp4200.conf
-rw-r--r--. 1 root root 238 Jul 25 2010 hp5400.conf
-rw-r--r--. 1 root root 497 Jul 25 2010 hp.conf
-rw-r--r--. 1 root root 22 Jul 25 2010 hpsj5s.conf
-rw-r--r--. 1 root root 24 Jul 25 2010 hs2p.conf
-rw-r--r--. 1 root root 38 Jul 25 2010 ibm.conf
-rw-r--r--. 1 root root 367 Jul 25 2010 kodak.conf
-rw-r--r--. 1 root root 113 Jul 25 2010 leo.conf
-rw-r--r--. 1 root root 96 Jul 25 2010 lexmark.conf
-rw-r--r--. 1 root root 187 Jul 25 2010 ma1509.conf
-rw-r--r--. 1 root root 666 Jul 25 2010 matsushita.conf
-rw-r--r--. 1 root root 279 Jul 25 2010 microtek2.conf
-rw-r--r--. 1 root root 268 Jul 25 2010 microtek.conf
-rw-r--r--. 1 root root 2125 Jul 25 2010 mustek.conf
-rw-r--r--. 1 root root 3824 Jul 25 2010 mustek_pp.conf
-rw-r--r--. 1 root root 809 Jul 25 2010 mustek_usb.conf
-rw-r--r--. 1 root root 13 Jul 25 2010 nec.conf
-rw-r--r--. 1 root root 573 Jul 25 2010 net.conf
-rw-r--r--. 1 root root 365 Jul 25 2010 p5.conf
-rw-r--r--. 1 root root 75 Jul 25 2010 pie.conf
-rw-r--r--. 1 root root 492 Jul 25 2010 pixma.conf
-rw-r--r--. 1 root root 4142 Jul 25 2010 plustek.conf
-rw-r--r--. 1 root root 943 Jul 25 2010 plustek_pp.conf
-rw-r--r--. 1 root root 391 Jul 25 2010 qcam.conf
-rw-r--r--. 1 root root 29 Jul 25 2010 ricoh.conf
-rw-r--r--. 1 root root 183 Jul 25 2010 rts8891.conf
-rw-r--r--. 1 root root 13 Jul 25 2010 s9036.conf
-rw-r--r--. 1 root root 1052 Jul 25 2010 saned.conf
-rw-r--r--. 1 root root 48 Jul 25 2010 sceptre.conf
-rw-r--r--. 1 root root 1464 Jul 25 2010 sharp.conf
-rw-r--r--. 1 root root 115 Jul 25 2010 sm3840.conf
-rw-r--r--. 1 root root 2239 Jul 25 2010 snapscan.conf
-rw-r--r--. 1 root root 10 Jul 25 2010 sp15c.conf
-rw-r--r--. 1 root root 2224 Jul 25 2010 st400.conf
-rw-r--r--. 1 root root 178 Jul 25 2010 stv680.conf
-rw-r--r--. 1 root root 28 Jul 25 2010 tamarack.conf
-rw-r--r--. 1 root root 355 Jul 25 2010 teco1.conf
-rw-r--r--. 1 root root 636 Jul 25 2010 teco2.conf
-rw-r--r--. 1 root root 217 Jul 25 2010 teco3.conf
-rw-r--r--. 1 root root 1807 Jul 25 2010 test.conf
-rw-r--r--. 1 root root 1495 Jul 25 2010 u12.conf
-rw-r--r--. 1 root root 386 Jul 25 2010 umax1220u.conf
-rw-r--r--. 1 root root 3094 Jul 25 2010 umax.conf
-rw-r--r--. 1 root root 1684 Jul 25 2010 umax_pp.conf
-rw-r--r--. 1 root root 204 Jul 25 2010 v4l.conf
-rw-r--r--. 1 root root 399 Jul 25 2010 xerox_mfp.conf
setuptool.d:
total 56
-rw-r--r--. 1 root root 42 Jul 8 2010 98netconfig
-rw-r--r--. 1 root root 69 Jul 8 2010 98system-config-authentication
-rw-r--r--. 1 root root 47 Jul 8 2010 98system-config-display
-rw-r--r--. 1 root root 62 Jul 8 2010 98system-config-keyboard
-rw-r--r--. 1 root root 50 Jul 8 2010 99authconfig
-rw-r--r--. 1 root root 43 Jul 8 2010 99kbdconfig
-rw-r--r--. 1 root root 42 Jul 8 2010 99mouseconfig
-rw-r--r--. 1 root root 33 Jul 8 2010 99ntsysv
-rw-r--r--. 1 root root 46 Jul 8 2010 99printconf-tui
-rw-r--r--. 1 root root 45 Jul 8 2010 99sndconfig
-rw-r--r--. 1 root root 59 Jul 8 2010 99system-config-firewall-tui
-rw-r--r--. 1 root root 58 Jul 8 2010 99system-config-network-tui
-rw-r--r--. 1 root root 44 Jul 8 2010 99timeconfig
-rw-r--r--. 1 root root 40 Jul 8 2010 99Xconfigurator
statetab.d:
total 0
ls: cannot open directory sudoers.d: Permission denied
xinetd.d:
total 52
-rw-r--r--. 1 root root 1157 Mar 30 2011 chargen-dgram
-rw-r--r--. 1 root root 1159 Mar 30 2011 chargen-stream
-rw-r--r--. 1 root root 523 Jan 27 2011 cvs
-rw-r--r--. 1 root root 1157 Mar 30 2011 daytime-dgram
-rw-r--r--. 1 root root 1159 Mar 30 2011 daytime-stream
-rw-r--r--. 1 root root 1157 Mar 30 2011 discard-dgram
-rw-r--r--. 1 root root 1159 Mar 30 2011 discard-stream
-rw-r--r--. 1 root root 1148 Mar 30 2011 echo-dgram
-rw-r--r--. 1 root root 1150 Mar 30 2011 echo-stream
-rw-r--r--. 1 root root 332 Mar 28 2011 rsync
-rw-r--r--. 1 root root 1212 Mar 30 2011 tcpmux-server
-rw-r--r--. 1 root root 1149 Mar 30 2011 time-dgram
-rw-r--r--. 1 root root 1150 Mar 30 2011 time-stream
yum.repos.d:
total 12
-rw-r--r--. 1 root root 183 Apr 1 2011 adobe-linux-x86_64.repo
-rw-r--r--. 1 root root 116 Apr 21 16:44 google-chrome.repo
-rw-r--r--. 1 root root 2887 Apr 22 10:24 public-yum-ol6.repo
Now if you are using a distribution like Fedora you might find this directory in /etc/rc.d/init.d. Regardless of location, it serves the same purpose.
In order to control any of the scripts in init.d manually you have to have root (or sudo) access. Each script will be run as a command and the structure of the command will look like:
/etc/init.d/command OPTION
Where command is the actual command to run and OPTION can be one of the following:
start
stop
reload
restart
force-reload
Most often you will use either start, stop, or restart. So if you want to stop your network you can issue the command:
/etc/init.d/networking stop
Or if you make a change to your network and need to restart it, you could do so with the following command:
/etc/init.d/networking restart
Some of the more common init scripts in this directory are:
networking
samba
apache2
ftpd
sshd
dovecot
mysql
Of course there may be more often-used scripts in your directory - it depends upon what you have installed. The above list was taken from a Ubuntu Server 8.10 installation so a standard desktop installation would have a few less networking-type scripts.
But what about /etc/rc.local
There is a third option that I used to use quite a bit. This option is the /etc/rc.local script. This file runs after all other init level scripts have run, so it's safe to put various commands that you want to have issued upon startup. Many times I will place mounting instructions for things like nfs in this script. This is also a good place to place "troubleshooting" scripts in. For instance, once I had a machine that, for some reason, samba seemed to not want to start. Even afer checking to make sure the Samba daemon was setup to initialize at boot up. So instead of spending all of my time up front with this I simply placed the line:
/etc/init.d/samba start
in the /etc/rc.local script and Samba worked like a charm. Eventually I would come back and trouble shoot this issue.
Linux is flexible. Linux is so flexible there is almost, inevitably, numerous ways to solve a single problem. Starting a system service is one such issue. With the help of the /etc/init.d system (as well as /etc/rc.local) you can pretty much rest assured your service will start.