Synchronizing SCSI cache for disk sda: Power down.このまま、POWER と LINK/ACT の LED がついたまま。 どこかで miconapl -a shutdown_wait を実行する必要がある。
シャットダウン時に実行される /etc/rc0.d 下のどこかのファイルにいれると 良い。
(none):/etc# ls -l rc0.d total 4 lrwxrwxrwx 1 root root 14 Sep 2 18:35 K11cron -> ../init.d/cron lrwxrwxrwx 1 root root 15 Sep 2 18:36 K20exim4 -> ../init.d/exim4 lrwxrwxrwx 1 root root 15 Sep 2 18:35 K20inetd -> ../init.d/inetd lrwxrwxrwx 1 root root 17 Sep 2 18:33 K20makedev -> ../init.d/makedev lrwxrwxrwx 1 root root 20 Sep 2 18:33 K25hwclock.sh -> ../init.d/hwclock.sh lrwxrwxrwx 1 root root 13 Sep 2 18:36 K86ppp -> ../init.d/ppp lrwxrwxrwx 1 root root 13 Sep 2 18:37 K89atd -> ../init.d/atd lrwxrwxrwx 1 root root 15 Sep 2 18:37 K89klogd -> ../init.d/klogd lrwxrwxrwx 1 root root 18 Sep 2 18:37 K90sysklogd -> ../init.d/sysklogd -rw-r--r-- 1 root root 355 Jul 26 02:51 README lrwxrwxrwx 1 root root 18 Sep 2 18:34 S20sendsigs -> ../init.d/sendsigs lrwxrwxrwx 1 root root 17 Sep 2 18:34 S30urandom -> ../init.d/urandom lrwxrwxrwx 1 root root 22 Sep 2 18:34 S31umountnfs.sh -> ../init.d/umountnfs.sh lrwxrwxrwx 1 root root 20 Sep 2 18:36 S35networking -> ../init.d/networking lrwxrwxrwx 1 root root 18 Sep 2 18:36 S36ifupdown -> ../init.d/ifupdown lrwxrwxrwx 1 root root 18 Sep 2 18:34 S40umountfs -> ../init.d/umountfs lrwxrwxrwx 1 root root 14 Sep 2 18:34 S90halt -> ../init.d/halt (none):/etc#/etc/init.d/halt に入れる。
(none):/etc# cd init.d/
(none):/etc/init.d# ls
README glibc.sh mountall.sh rmnologin
atd halt mountnfs.sh sendsigs
bootclean.sh hostname.sh mountvirtfs sendsigs.sh
bootcomplete.sh hwclock.sh networking sethostname.sh
bootlogd hwclockfirst.sh networking.sh shutdown_start.sh
bootmisc.sh ifupdown nviboot single
checkfs.sh ifupdown-clean ppp skeleton
checkroot.sh inetd pppd-dns stop-bootlogd
checkroot.sh.orig kernelmon.sh procps.sh sysklogd
clientUtil_servd.sh keymap.sh procps.sh.orig syslog.sh
console-screen.sh klogd rc umount_disk.sh
create_devlink.sh logtag rcDown umountfs
cron makedev rcS umountnfs.sh
diskmon.sh micon_setup.sh reboot urandom
dns-clean miconmon.sh reboot.sh
exim4 miconmon.sh.save reboot_start.sh
ftpd.sh modutils restore_config.sh
(none):/etc/init.d# mv halt halt.orig
(none):/etc/init.d# cp halt.orig halt
(none):/etc/init.d# vi halt
:
:
(none):/etc/init.d# diff -c halt.orig halt
*** halt.orig Wed Jan 5 09:28:05 2005
--- halt Sun Sep 10 01:51:24 2006
***************
*** 45,50 ****
--- 45,51 ----
poweroff=""
fi
+ /usr/local/sbin/miconapl -a shutdown_wait
halt -d -f -i $poweroff $hddown
: exit 0
(none):/etc/init.d# shutdown -h now
Broadcast message from root (ttyS0) (Sun Sep 10 01:52:09 2006):
:
Unmounting local filesystems...done.
err: Initialize: file[/var/lock/miconapl] open fail.
err: Initialize: file[/var/lock/miconapl] open fail.
Synchronizing SCSI cache for disk sda:
Power down.
Unmounting local filesystems してからではあかん。(none):/etc/init.d# mv halt.orig halt
|
余談。 いつも、オリジナルを保存し、コピーに変更を加えている。 例: # mv file file.orig → オリジナルの保存 # cp file.orig file → コピーの作成 # vi file → コピーの編集これは、このケースのように元に戻すときに 何もなかったことにするためである。 もし、オリジナルを編集していたら、 例: # cp file file.orig → コピーの作成 # vi file → オリジナルの編集file.orig のタイムスタンプはコピー実行時。 元戻してもオリジナルのタイムスタンプは戻せない。 |
もっと前で、、、どこにいれよか、、、入れるとこない。
新しく作ることにする。
(none):/etc/init.d# cat miconapl
#!/bin/sh
[ -f /usr/local/sbin/miconapl ] || exit 0
case "$1" in
start)
/usr/local/sbin/miconapl -a boot_end
;;
stop)
/usr/local/sbin/miconapl -a shutdown_wait
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac
exit 0
(none):/etc/init.d# chmod +x miconapl
(none):/etc/init.d# ln -s ../init.d/miconapl ../rc0.d/K10miconapl
(none):/etc/init.d# ls -l ../rc0.d/K10miconapl
lrwxrwxrwx 1 root root 18 Sep 10 02:01 ../rc0.d/K10miconapl -> ../init.d/miconapl
(none):/etc/init.d# shutdown -h now
:
:
Synchronizing SCSI cache for disk sda:
Power down.
むむむ、POWER LED は点滅するが shutdown -h now で電源断までいかない。
miconapl -a shutdown_wait だけではダメなのか、、、、
Synchronizing SCSI cache for disk sda: Power down.だが、標準ファームで shutdown -h now を実行すると、
Synchronizing SCSI cache for disk sda: System halted. >miconCntl_PowerOff >miconCntl_ShutdownWaitであることに気が付いた。
(none):/etc/init.d# cat /etc/default/halt # Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff". HALT=poweroff (none):/etc/init.d#と poweroff。
(none):/etc/init.d# vi /etc/default/halt : : (none):/etc/init.d# cat /etc/default/halt # Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff". #HALT=poweroff HALT=halt (none):/etc/init.d# shutdown -h now Broadcast message from root (ttyS0) (Sun Sep 10 05:56:11 2006): The system is going down for system halt NOW! : Synchronizing SCSI cache for disk sda: System halted. >miconCntl_PowerOff >miconCntl_ShutdownWaitおちたぁ!
あとは、電源スイッチによる電源 OFF。
こんなところか。
|
← LS-GL:debian:POWER LED 点滅解除 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-GL:debian:電源ボタンによる電源 OFF |