Original URL: http://blog.csdn.net/gavinr/article/details/6584582
Linux starts the first process is/sbin/init, its main function is the software execution environment, including the system host name, network settings, language processing, file system format and other services start. Its config file is/etc/inittab, but I didn't find it in my ubuntu10.10.
Originally used in Ubuntu/etc/event.d this directory, complete similar functions. The ubuntu9.10 version of upstart no longer uses the/ETC/EVENT.D directory. Instead, use the/etc/init directory instead. A file rc-sysinit.conf was found under/etc/init/, similar to the Rc.sysinit file name, and was opened and found to have the following contents:
[HTML]View Plaincopyprint?
- # Rc-sysinit-system V initialisation compatibility
- #
- # This task runs the old system V-style system initialisation scripts,
- # and enters the default runlevel when finished.
- # Check for default RunLevel in/etc/inittab
- if [-r/etc/inittab]
- Then
- Eval "$ (sed-nre ' s/^[^#][^:]*:([0-6SS]): initdefault:.*/default_runlevel=" \1 ";/P '/etc/inittab | | true) "
- Fi
- ......
- # Run the system initialisation scripts
- [-N "${from_single_user_mode}"] | | /etc/init.d/rcs
Obviously, Ubuntu still supports/etc/initab files. At the end of the script,/etc/init.d/rcs is executed, and the contents of the RcS are:
[HTML]View Plaincopyprint?
- #! /bin/sh
- #
- # RcS
- #
- # call all S?? * Scripts in/etc/rcs.d/in numerical/alphabetical Order
- #
All the statements in the file have been commented out, it appears that the file exists only for compatibility, not the implementation of the use. But take a look at the SRS.D directory:
[HTML]View Plaincopyprint?
- [Email protected]:/etc/rcs.d$ ll
- Total 20
- -rw-r--r--1 root root 447 2009-09-07 11:58 README
- lrwxrwxrwx 1 root root 2010-12-07 05:27 S01apparmor->. /init.d/apparmor*
- lrwxrwxrwx 1 root root 2010-12-07 05:27 S01brltty->. /init.d/brltty*
- lrwxrwxrwx 1 root root 2010-12-07 05:27 s01lm-sensors->. /init.d/lm-sensors*
- lrwxrwxrwx 1 root root 2010-12-07 05:27 S01x11-common->. /init.d/x11-common*
- lrwxrwxrwx 1 root root 2010-12-07 05:27 s02pcmciautils->. /init.d/pcmciautils*
- lrwxrwxrwx 1 root root 2010-12-07 05:27 s02urandom->. /init.d/urandom*
All files are symbolic links, all pointing to: Files in the/INIT.D directory
"Go" in Ubuntu without/etc/inittab files