|
发表于 2007-2-4 20:00:17
|
显示全部楼层
Gentoo太复杂了,看看Arch的:
我的系统的启动进程的设计:
init 5:
http://zinczombie.spaces.live.com/blog/cns!9175AA0F213BAB7C!159.entry
init 3:
http://zinczombie.spaces.live.com/blog/cns!9175AA0F213BAB7C!158.entry
[lanzinc@206studio etc]$ ls rc.*
rc.conf rc.local rc.multi rc.single
rc.conf.pacnew rc.local.shutdown rc.shutdown rc.sysinit
rc.d:
acpid gpm kpasswd saslauthd
adsl hal lisa sensors
alsa heimdal-kdc motion slapd
avahi-daemon httpd mysqld slpd
avahi-dnsconfd hwd netfs snmpd
crond iptables network svnserve
cups jack-audio-connection-kit nscd syslog-ng
dbus kadmind portmap tor
esd kdm postfix virtualbox
fam kmyfirewall ppp
functions kmyfirewall.bak privoxy
[lanzinc@206studio etc]$ cat rc.conf.pacnew (rc.conf的一个备份,启动过程配置文件。相当于原始的rc.conf,未被我修改过的)
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="Canada/Pacific"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
#
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - modules in this list will never be loaded by udev
MOD_BLACKLIST=()
#
# Modules to load at boot-up (in this order)
# - prefix a module with a ! to blacklist it
#
MODULES=()
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
#
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="myhost"
#
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available
# interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
#
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network-profiles
#
#NET_PROFILES=(main)
#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond)
# End of file
[lanzinc@206studio etc]$
[lanzinc@206studio etc]$ pacman -Qs init
local/gen-init-cpio 2.6.17-1
Program to compress initramfs images
local/initscripts 0.8-6
System initialization/bootup scripts
local/mkinitcpio 0.5.13-1
Advanced, modular initramfs image creation utility
local/module-init-tools 3.2.2-3
Utilities for inserting and removing modules from the Linux kernel
local/mozilla-common 1.1-1
Common Initialization Profile for Mozilla.org products
local/sysvinit 2.86-2
Linux System V Init
local/xorg-xinit 1.0.3-1
X.Org initialisation program
[lanzinc@206studio etc]$ pacman -Ql sysvinit
sysvinit /bin/
sysvinit /bin/mountpoint
sysvinit /bin/pidof
sysvinit /sbin/
sysvinit /sbin/bootlogd
sysvinit /sbin/halt
sysvinit /sbin/init
sysvinit /sbin/killall5
sysvinit /sbin/poweroff
sysvinit /sbin/reboot
sysvinit /sbin/runlevel
sysvinit /sbin/shutdown
sysvinit /sbin/sulogin
sysvinit /sbin/telinit
sysvinit /usr/
sysvinit /usr/bin/
sysvinit /usr/bin/last
sysvinit /usr/bin/lastb
sysvinit /usr/bin/mesg
sysvinit /usr/bin/utmpdump
sysvinit /usr/bin/wall
sysvinit /usr/include/
sysvinit /usr/include/initreq.h
sysvinit /usr/man/
sysvinit /usr/man/man1/
sysvinit /usr/man/man1/last.1.gz
sysvinit /usr/man/man1/lastb.1.gz
sysvinit /usr/man/man1/mesg.1.gz
sysvinit /usr/man/man1/mountpoint.1.gz
sysvinit /usr/man/man1/wall.1.gz
sysvinit /usr/man/man5/
sysvinit /usr/man/man5/initscript.5.gz
sysvinit /usr/man/man5/inittab.5.gz
sysvinit /usr/man/man8/
sysvinit /usr/man/man8/bootlogd.8.gz
sysvinit /usr/man/man8/halt.8.gz
sysvinit /usr/man/man8/init.8.gz
sysvinit /usr/man/man8/killall5.8.gz
sysvinit /usr/man/man8/pidof.8.gz
sysvinit /usr/man/man8/poweroff.8.gz
sysvinit /usr/man/man8/reboot.8.gz
sysvinit /usr/man/man8/runlevel.8.gz
sysvinit /usr/man/man8/shutdown.8.gz
sysvinit /usr/man/man8/sulogin.8.gz
sysvinit /usr/man/man8/telinit.8.gz
[lanzinc@206studio etc]$
[lanzinc@206studio etc]$ pacman -Ql initscripts
initscripts /bin/
initscripts /bin/isatty
initscripts /etc/
initscripts /etc/conf.d/
initscripts /etc/inittab
initscripts /etc/network-profiles/
initscripts /etc/network-profiles/template
initscripts /etc/rc.conf
initscripts /etc/rc.d/
initscripts /etc/rc.d/functions
initscripts /etc/rc.d/netfs
initscripts /etc/rc.d/network
initscripts /etc/rc.local
initscripts /etc/rc.local.shutdown
initscripts /etc/rc.multi
initscripts /etc/rc.shutdown
initscripts /etc/rc.single
initscripts /etc/rc.sysinit
initscripts /sbin/
initscripts /sbin/makedevs
initscripts /sbin/minilogd
initscripts /usr/
initscripts /usr/bin/
initscripts /usr/bin/netcfg
[lanzinc@206studio etc]$
如果需要我可以把相应的 脚本也贴出来。
希望有用。
主要的是进程的启动顺序,及以那个身份运行。以用户身份还是root身份,或进程独有的用户身份运行。
登录后运行还是登录前运行。 |
|