hackkit:~# cd /etc/init.d/
hackkit:/etc/init.d# cat miconapl
#!/bin/sh
case "$1" in
start)
chroot /usr/local/buffalo mount -t proc proc /proc
chroot /usr/local/buffalo /etc/init.d/checkroot.sh start
chroot /usr/local/buffalo /usr/local/sbin/miconapl -b -a boot_end
chroot /usr/local/buffalo /etc/init.d/FanController.sh start
;;
stop)
chroot /usr/local/buffalo /etc/init.d/FanController.sh stop
chroot /usr/local/buffalo umount /proc
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
hackkit:/etc/init.d# cd /
hackkit:~# chmod +x /etc/init.d/miconapl
hackkit:/# ln -s ../init.d/miconapl etc/rc0.d/K10miconapl
hackkit:/# ln -s ../init.d/miconapl etc/rc6.d/K10miconapl
hackkit:/# ln -s ../init.d/miconapl etc/rcS.d/S80miconapl
hackkit:/#
これでうまく行くはず。再起動する。
: /etc/init.d/FanController.sh: /etc/init.d/FanController.sh: 37: Fand: not found :/etc/init.d/FanController.sh は
start(){
if [ -x /usr/local/sbin/Fand ] ; then
Fand &
fi
}
となっていて、ここでエラーになっている。
つまり /usr/local/sbin へパスが通っていない。
再起動。
今度は、、、
: /usr/local/sbin/Fand: /usr/local/sbin/Fand: 4: miconapl: not found :/usr/local/sbin をパスを通す。対応がバラバラ
yasunari@hackkit:~$ less /usr/local/buffalo/usr/local/sbin/Fand #!/bin/sh PATH=$PATH:/usr/local/sbin export PATH CONF_FILE=/etc/fan.prof miconapl -a fan_set_speed full : :再起動。
![]() |
玄人志向
楽天市場 |
|
← 「最初の設定」 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 電源ボタン監視の自動起動 |