分析自己的linux启动代码

1,rcS

#!/bin/sh
#
# rcS		Call all S??* scripts in /etc/rcS.d in
#		numerical/alphabetical order.
#
# Version:	@(#)/etc/init.d/rcS  2.76  19-Apr-1999  miquels@cistron.nl
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin
runlevel=S
prevlevel=N
umask 022
export PATH runlevel prevlevel

#挂载fstab下的所有选项
/bin/mount -a
#加载模块
/sbin/udevd --daemon


#needed for telnet to work properly
/bin/mkdir /dev/pts
/bin/mount n /dev/pts -t devpts


#	Make sure proc is mounted
#
[ -d "/proc/1" ] || mount /proc

echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug


#
#	See if system needs to be setup. This is ONLY meant to
#	be used for the initial setup after a fresh installation!
#
#if [ -x /sbin/unconfigured.sh ]
#then
#  /sbin/unconfigured.sh
#fi

#
#	Source defaults.
#
#. /etc/default/rcS

#
#	Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
#	检测中断信号量,忽略?
trap ":" INT QUIT TSTP

#
#	Call all parts in order.
#	执行下一脚本
exec /etc/init.d/rc S

#
#	For compatibility, run the files in /etc/rc.boot too.
#
#[ -d /etc/rc.boot ] && run-parts /etc/rc.boot

#
#	Finish setup if needed. The comment above about
#	/sbin/unconfigured.sh applies here as well!
#
#if [ -x /sbin/setup.sh ]
#then
#  /sbin/setup.sh
#fi


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值