pepoとネットワークを語ろう

40年前からこれまでとこれからのネットワークを語る

fedora10のinitがなんか変

2009-01-20 12:05:06 | Linux
fedoraの1CDLinux化を計画
fedora10をインストール後/etc/inittabへ起動用のscriptを設定するが思惑通り動かず
かなりの思考錯誤が続いた後・・・もっと早く確認したら良かったが
ふとinitのマニュアルを確認するとブートアップ後/etc/event.d/以下のscriptsを順次実行するようだ
# ls /etc/event.d/
control-alt-delete quit-plymouth rc2 rc5 rcS-sulogin tty1 tty4
logd rc0 rc3 rc6 serial tty2 tty5
prefdm

fedoraのいつのバージョンからか知らないが、fedora10の起動は -->grub -->kernelイメージロード&実行 -->linuxrc -->
/etc/event.d/rcS --> /etc/rc.d/rc.sysinit --> /etc/event.d/rc3

# man init
init(8)

NAME
init - process management daemon

SYNOPSIS
init [OPTION]...

DESCRIPTION
init is the parent of all processes on the system, it is executed by
the kernel and is responsible for starting all other processes; it is
the parent of all processes whose natural parents have died and it is
responsible for reaping those when they die.

Processes managed by init are known as jobs, and can be further split
into two types; services are supervised and respawned if they should
terminate unexpectedly, and tasks are simply run once and not respawned
if they should terminate.

On startup init reads the /etc/event.d directory, each file describes a
job that should be managed. This includes the particulars about what
binary or shell script code should executed while the job is running,
and which events can cause the job to be started or stopped.

inittabはinitdefaultしか使ってない!との事で  -->Centos5.2のinitへ入れ替え
# vi /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/event.d/rcS
#
# Individual runlevels are started by /etc/event.d/rc[0-6]
#
# Ctrl-Alt-Delete is handled by /etc/event.d/control-alt-delete
#
# Terminal gettys (tty[1-6]) are handled by /etc/event.d/tty[1-6] and
# /etc/event.d/serial
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(8), initctl(8), and events(5).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault: