ume-
1./etc/inittab
文件
系统配置文件,记录文件系统需要启动哪些进程。命令行格式:
:
:
:
:
表示这个进程要使用的控制台
(即标准输入、
标准输出、
标准错误设备)
。
如果省
略,
则使用与
init
进
:表示这个进程要使用的控制台(即标准输入、标准输出、标准 错误设
备)
。如果省
略,则使用与
init
进程一样的控制台。
:对于
Busybox init
程序,这个字段无意义,可以省略。始终以
init
进程做为系
统进程
:表 示
init
程序如何控制这个子进程。
(关于
init
进程以下会有 详细说明)
:
要执行的程序,它可以是可执行程序,也可以是脚本。
------------- -------------------------------------------------- -------------------------------------------------- ----
# /etc/inittab init(8) configuration for BusyBox
#
# Copyright (C) 1999-2004 by Erik Andersen
#
#
# Note,
BusyBox init doesn't support runlevels
.
The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use sysvinit.
#
#
# Format for each entry
:
:
:
:
#
#
:
W
ARNING
:
This field has a non-traditional meaning for BusyBox init!
#
#
The id field is used by BusyBox init to specify the controlling tty for
#
the specified process to run on.
The contents of this field are
#
appended to
There is no need for this field to
#
be unique, although if it isn't you may have strange results.
If this
#
field is left blank, it is completely ignored.
Also note that if
#
BusyBox detects that a serial console is in use, then all entries
#
containing non- empty id fields will _not_ be run.
BusyBox init does
#
nothing with utmp.
We don't need no stinkin' utmp.
#
#
:
The runlevels field is completely ignored.
#
#
:
Valid actions include
:
sysinit, respawn, askfirst, wait, once,
#
restart, ctrlaltdel, and shutdown.
#
#
Note
:
askfirst acts just like respawn, but before running the specified
#
process it displays the line
#
console.
#
the specified process.
#
#
Note
:
unrecognised actions (like initdefault) will cause init to emit
#
an error message, and then go along with its business.
#
#
:
Specifies the process to be executed and it's command line.
#
# Note
:
BusyBox init works just fine without an inittab. If no inittab is
# found, it has the following default behavior
:
#
:
:
sysinit
:
/etc/init.d/rcS
init
进程在上电后运行
/etc/init.d/rcS
脚本
#
:
:
askfirst
:
/bin/sh
init
进程先询问再执行
sh
程序
#
:
:
ctrlaltdel
:
/sbin/reboot
init
进程接收到
ctrl+alt+del
后
,运行
reboot
程序
#
:
:
shutdown
:
/sbin/swapoff -a
init
进程在关机后运行
swapoff
程序
#
:
:
shutdown
:
/bin/umount -a -r
init
进程在关机后运行
umount
程序
#
:
:
restart
:
/sbin/init
init
进程在重起时执行
init
命令
#
# if it detects that /dev/console is _not_ a serial console, it will
# also run
:
#
tty2
:
:
askfirst
:
/bin/sh
#
tty3
:
:
askfirst
:
/bin/sh
#
tty4
:
:
askfirst
:
/bin/sh
#
# Boot-time system configuration/initialization script.
# This is run first except when booting in single-user mode.
#
:
:
sysinit
:
/etc/init.d/rcS
# /bin/sh invocations on selected ttys
#
# Note below that we prefix the shell commands with a
# shell that it is supposed to be a login shell.
Normally this is handled by
# login, but since we are bypassing login in this case, BusyBox lets you do
# this yourself...
#
# Start an
#
:
:
askfirst
:
-/bin/sh
# Start an
# tty2
:
:
askfirst
:
-/bin/sh
# tty3
:
:
askfirst
:
-/bin/sh
# tty4
:
:
askfirst
:
-/bin/sh
# /sbin/getty invocations for selected ttys
# tty4
:
:
respawn
:
/sbin/getty 38400 tty5
# tty5
:
:
respawn
:
/sbin/getty 38400 tty6
Respawn
:启动进程,但不等待进程结束便继续处理
i nittab
中下一项
该进程死亡,
init
重新启动该进程
ume-
ume-
ume-
ume-
ume-
ume-
ume-
ume-
本文更新与2021-01-21 20:34,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/546025.html
-
上一篇:华中科技大学考博英语-真题-答案
下一篇:AMS1117引脚图