谁能解释这个奇怪的/etc/inittab?

# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# The /etc/inittab file controls the configuration of init(1M); for more
# information refer to init(1M) and inittab(4).  It is no longer
# necessary to edit inittab(4) directly; administrators should use the
# Solaris Service Management Facility (SMF) to define services instead.
# Refer to smf(5) and the System Administration Guide for more
# information on SMF.
#
# For modifying parameters passed to ttymon, use svccfg(1m) to modify
# the SMF repository. For example:
#
#       # svccfg
#       svc:> select system/console-login
#       svc:/system/console-login> setprop ttymon/terminal_type = "xterm"
#       svc:/system/console-login> exit
#
#ident  "@(#)inittab    1.41    04/12/14 SMI"
ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -f /etc/sock2path
smf::sysinit:/lib/svc/bin/svc.startd    >/dev/msglog 2<>/dev/msglog </dev/console
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
pt:s1234:powerfail:/usr/lib/svc/method/installupdates lock
LT:3:respawn:/usr/sbin/tictimed >/dev/msglog 2<>/dev/msglog


inttab只有这么多内容

最后一行说,默认启动模式3
但是没有发现去读 /etc/rc$.d/ 呀。

若加一项默认启动程序,同事说加到 /etc/rc2.d/S** 就行,这个为什么是rc2.d呢?

作者: 饭碗儿   发布时间: 2011-04-01

rc2.d中的都是要在运行级别2启动的,此时系统已经完全启动进入多用户了,此时只能访问本地资源。

rc3.d中的是要在运行级别3启动的,多了系统正常启动后要启动nfs,此时可以跨网络访问资源。


rc2.d和rc3.d都是多用户模式。


把你自己的启动脚本放到rc2.d就是指不需要启动nfs也能启动你的程序。

作者: easybegin   发布时间: 2011-04-01