(none):~# while true > do > cat /proc/driver/kernevnt > done lanact 0 halflanact 100 full電源ボタンを長押しすると、
lanact 0 halflanact 100 fullmicon_interruptsと micon_interrupts が読出せた。
(none):~# while true > do > cat /proc/driver/kernevnt > miconapl -a int_get_switch_status > done lanact 0 half#[miconapl.int_get_switch_status] int=unknown lanact 100 full#[miconapl.int_get_switch_status] int=unknown電源ボタンを長押しすると、
micon_interrupts#[miconapl.int_get_switch_status] int=power_swよし。
root@UDE:/# ls -l /etc/init.d/kernelmon.sh -rwxr-xr-x 1 root root 494 Jun 8 20:54 /etc/init.d/kernelmon.sh root@UDE:/# cp /etc/init.d/kernelmon.sh /mnt/debinst/etc/init.d/kernelmon root@UDE:/# ls -l !$ ls -l /mnt/debinst/etc/init.d/kernelmon -rwxr-xr-x 1 root root 494 Sep 10 10:06 /mnt/debinst/etc/init.d/kernelmon root@UDE:/# vi !$ vi /mnt/debinst/etc/init.d/kernelmon : : root@UDE:/# diff -c /etc/init.d/kernelmon.sh /mnt/debinst/etc/init.d/kernelmon *** /etc/init.d/kernelmon.sh Thu Jun 8 20:54:19 2006 --- /mnt/debinst/etc/init.d/kernelmon Sun Sep 10 10:07:02 2006 *************** *** 1,7 **** #!/bin/sh # processname: kernelmon ! . /etc/init.d/logtag if ! [ -x /usr/local/sbin/kernelmon ]; then exit 0 --- 1,7 ---- #!/bin/sh # processname: kernelmon ! #. /etc/init.d/logtag if ! [ -x /usr/local/sbin/kernelmon ]; then exit 0 *************** *** 11,17 **** { echo -n "Starting kernelmon:" /usr/local/sbin/kernelmon & ! logger -t ${LOGTAG} -p ${LOGFACILITY} 'Started kernelmon' } stop() --- 11,17 ---- { echo -n "Starting kernelmon:" /usr/local/sbin/kernelmon & ! # logger -t ${LOGTAG} -p ${LOGFACILITY} 'Started kernelmon' } stop() root@UDE:/#
root@UDE:/# tar cf - usr/local/sbin/kernelmon |(cd /mnt/debinst/; tar xvf -) usr/local/sbin/kernelmon root@UDE:/#
root@UDE:/# tar cf - usr/local/bin/kernelmon_exec.sh |(cd /mnt/debinst/; tar xvf -) usr/local/bin/kernelmon_exec.sh root@UDE:/# vi /mnt/debinst/usr/local/bin/kernelmon_exec.sh : root@UDE:/# diff -c usr/local/bin/kernelmon_exec.sh /mnt/debinst/usr/local/bin/kernelmon_exec.sh *** usr/local/bin/kernelmon_exec.sh Thu Jun 8 11:40:26 2006 --- /mnt/debinst/usr/local/bin/kernelmon_exec.sh Sun Sep 10 10:22:05 2006 *************** *** 5,11 **** MICONAPL=/usr/local/sbin/miconapl ! . /usr/local/bin/libbuffalo if [ "$1" = "" ]; then exit 1 --- 5,11 ---- MICONAPL=/usr/local/sbin/miconapl ! #. /usr/local/bin/libbuffalo if [ "$1" = "" ]; then exit 1 *************** *** 77,83 **** ##echo "miconint = ($int)" >/dev/console case $int in power_sw) ! /usr/local/bin/shutdown.sh normal ;; lcd_sw) # echo sense lcd switch pushed --- 77,84 ---- ##echo "miconint = ($int)" >/dev/console case $int in power_sw) ! # /usr/local/bin/shutdown.sh normal ! shutdown -h now ;; lcd_sw) # echo sense lcd switch pushed root@UDE:/#
まずは kernelmon の起動
(none):~# /etc/init.d/kernelmon /etc/init.d/kernelmon: line 36: ehco: command not found (none):~# head -36 /etc/init.d/kernelmon | tail -1 ehco "Usage: kernelmon {start|stop|restart}" (none):~#(自分のオプションつけ忘れは棚に上げて)プッ
(none):~# /etc/init.d/kernelmon start Starting kernelmon:(none):~# /usr/local/bin/kernelmon_exec.sh: line 7: /etc/default/buffalo: No such file or directory /usr/local/bin/kernelmon_exec.sh: line 7: /etc/default/buffalo: No such file or directory (none):~# (none):~# ps -aef UID PID PPID C STIME TTY TIME CMD root 1 0 2 19:29 ? 00:00:04 init [2] : : root 543 1 0 19:33 ttyS0 00:00:00 /bin/sh /usr/local/sbin/kernelmo root 548 543 0 19:33 ttyS0 00:00:00 cat /proc/driver/kernevnt root 550 518 0 19:33 ttyS0 00:00:00 ps -aef (none):~#とりあえず動いたようだが、、
/usr/local/bin/kernelmon_exec.sh をみたら、、、修正が戻っている。
/usr/local/bin を見てみたら、、
(none):/# cd usr/local/bin (none):/usr/local/bin# ls exec_libbuffalo kernelmon_exec.sh libbuffalo shutdown.sh imhere.sh lcd_error_man.sh set_time.sh (none):/usr/local/bin# ls -l total 40 -rwxr-xr-x 1 root root 42 Apr 7 13:21 exec_libbuffalo -rwxr-xr-x 1 root root 238 May 8 19:56 imhere.sh -rwxr-xr-x 1 root root 1727 Jun 8 11:40 kernelmon_exec.sh -rwxr-xr-x 1 root root 273 May 1 16:21 lcd_error_man.sh -rwxr-xr-x 1 root root 14516 Jun 9 10:38 libbuffalo -rwxr-xr-x 1 root root 22 Apr 25 10:41 set_time.sh -rwxr-xr-x 1 root root 107 Apr 28 14:05 shutdown.sh (none):/usr/local/bin#コピーした覚えのないファイルがたくさん。
とりあえずもう一回同じ修正を行う。
(none):~# vi /usr/local/bin/kernelmon_exec.sh : :
Broadcast message from root (Sun Sep 10 20:09:19 2006): The system is going down for system halt NOW! INIT: Sending processes the TERM signal MIntAct : : System halted. >miconCntl_PowerOff >miconCntl_ShutdownWait落ちた。
initrd の /linuxrc をはやいこと何とかせんと、、、
← LS-GL:debian:電源ボタンによる電源 OFF |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-GL:debian:initrd.buffalo の変更 |