RT
请教:shell中键入poweroff后,系统究竟做了哪些事?
请教:shell中键入poweroff后,系统究竟做了哪些事?
-
- 帖子: 56
- 注册时间: 2007-12-27 10:13
- 来自: shanghai
-
- 帖子: 56
- 注册时间: 2007-12-27 10:13
- 来自: shanghai
Re: 请教:shell中键入poweroff后,系统究竟做了哪些事?
呵呵,这也算啊?qkbeyond 写了:关闭所有程序
-
- 帖子: 56
- 注册时间: 2007-12-27 10:13
- 来自: shanghai
Re: 请教:shell中键入poweroff后,系统究竟做了哪些事?
比如涉及哪些文件,类似其它linux的inittab文件。
-
- 帖子: 6548
- 注册时间: 2008-10-31 22:12
- 系统: 践兔
- 联系:
Re: 请教:shell中键入poweroff后,系统究竟做了哪些事?
代码: 全选
>> cat /etc/event.d/rc0
# rc0 - runlevel 0 compatibility
#
# This task runs the old sysv-rc runlevel 0 ("halt/poweroff") scripts with
# the decision as to whether to halt or power off the system left up to the
# script (and thus /etc/default/poweroff).
start on runlevel 0
stop on runlevel [!0]
console output
script
set $(runlevel || true)
if [ "$2" != "0" ] && [ "$2" != "6" ]; then
set $(runlevel --set 0 || true)
fi
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 0
end script
>> ls -lv /etc/rc0.d/
总用量 4
lrwxrwxrwx 1 root root 17 2009-10-11 18:50 K09apache2 -> ../init.d/apache2
lrwxrwxrwx 1 root root 20 2010-01-15 20:32 K20fancontrol -> ../init.d/fancontrol
lrwxrwxrwx 1 root root 20 2009-12-08 18:58 K20kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root 18 2009-12-20 09:13 K20qemu-kvm -> ../init.d/qemu-kvm
lrwxrwxrwx 1 root root 17 2009-12-20 09:10 K20vboxdrv -> ../init.d/vboxdrv
lrwxrwxrwx 1 root root 24 2009-10-17 08:41 K20virtualbox-ose -> ../init.d/virtualbox-ose
lrwxrwxrwx 1 root root 15 2009-10-11 18:50 K21mysql -> ../init.d/mysql
lrwxrwxrwx 1 root root 19 2009-10-11 18:50 K22mysql-ndb -> ../init.d/mysql-ndb
lrwxrwxrwx 1 root root 23 2009-10-11 18:50 K23mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm
lrwxrwxrwx 1 root root 20 2009-10-11 16:00 K25hwclock.sh -> ../init.d/hwclock.sh
lrwxrwxrwx 1 root root 20 2009-10-11 16:00 K50alsa-utils -> ../init.d/alsa-utils
lrwxrwxrwx 1 root root 19 2009-10-11 16:00 K74bluetooth -> ../init.d/bluetooth
lrwxrwxrwx 1 root root 21 2009-10-11 16:00 K99laptop-mode -> ../init.d/laptop-mode
-rw-r--r-- 1 root root 353 2009-09-08 02:58 README
lrwxrwxrwx 1 root root 41 2009-10-11 16:00 S01linux-restricted-modules-common -> ../init.d/linux-restricted-modules-common
lrwxrwxrwx 1 root root 29 2009-12-08 03:22 S10unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx 1 root root 22 2009-10-11 16:00 S15wpa-ifupdown -> ../init.d/wpa-ifupdown
lrwxrwxrwx 1 root root 18 2009-10-11 16:00 S20sendsigs -> ../init.d/sendsigs
lrwxrwxrwx 1 root root 17 2009-10-11 16:00 S30urandom -> ../init.d/urandom
lrwxrwxrwx 1 root root 22 2009-10-11 16:00 S31umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root 20 2009-12-08 03:20 S35networking -> ../init.d/networking
lrwxrwxrwx 1 root root 18 2009-10-11 16:00 S40umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 20 2009-10-11 16:00 S60umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root 14 2009-10-11 16:00 S90halt -> ../init.d/halt
代码: 全选
] ls -ld //
- HuntXu
- 帖子: 5776
- 注册时间: 2007-09-29 3:09
-
- 帖子: 32
- 注册时间: 2008-01-29 9:09
Re: 请教:shell中键入poweroff后,系统究竟做了哪些事?
man里面说的挺清除的,自己看吧