さらに追う



起動時のrcSとシャットダウン時のrcDownを追ってみる

root@LS-GL216:/media/sdb1# cat etc/init.d/rcS
#!/bin/sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH

exec_sh()
{
echo "===== exec:$1 ====="
/etc/init.d/$1 start
}

echo "--- rcStart (initrd) ---"

mount proc /proc -t proc
mkdir -m 777 /sys
mount sysfs /sys -t sysfs

mount -o rw,remount /dev/root /
mount -a

ldconfig

exec_sh checkroot.sh
exec_sh create_devlink.sh
exec_sh fwupdate.sh
if [ -f /tmp/reboot ]; then
exit 0
fi
exec_sh sethostname.sh
exec_sh restore_config.sh
exec_sh networking.sh start

# exec_sh syslog.sh start
exec_sh create_usblink.sh
exec_sh kernelmon.sh start ←独自
exec_sh miconmon.sh start 
exec_sh diskmon.sh start
exec_sh micon_setup.sh start
exec_sh clientUtil_servd.sh start
exec_sh daemonwatch.sh start
exec_sh bootcomplete.sh

root@LS-GL216:/media/sdb1# cat etc/init.d/rcDown
#!/bin/sh

exec_sh()
{
echo "===== exec:$1 ====="
/etc/init.d/$1 stop
}

echo "--- rcDown ---"

for cmd in shutdown_start.sh shutdown_proc.sh umount_disk.sh sendsigs.sh
↑後でこれらのシェルを追う
do
exec_sh $cmd
done
root@LS-GL216:/media/sdb1# cat etc/init.d/shutdown_start.sh
#! /bin/sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

. /usr/local/bin/libbuffalo

echo "called shutdown_start $0"
miconapl -a bz_on button

while [ -f /var/run/fwupdate ];
do
echo "delay shutdown"
sleep 5
done


miconapl -a shutdown_wait
root@LS-GL216:/media/sdb1# cat etc/init.d/shutdown_proc.sh
#!/bin/sh

/etc/init.d/daemonwatch.sh stop
/etc/init.d/clientUtil_servd.sh stop
/etc/init.d/ftpd.sh stop
/etc/init.d/diskmon.sh stop
/etc/init.d/kernelmon.sh stop
/etc/init.d/miconmon.sh stop
root@LS-GL216:/media/sdb1# cat etc/init.d/umount_disk.sh
#!/bin/sh

. /usr/local/bin/libbuffalo
kill_all
umount_AllDisks
umount_swap
root@LS-GL216:/media/sdb1# cat etc/init.d/sendsigs.sh
#!/bin/sh

. /usr/local/bin/libbuffalo

umount_swap
kill_syslog

umount /proc /sys
/bin/umount -r /

次はカーネルuImage.buffalo

root@LS-GL216:/media/sdb1# cd
root@LS-GL216:~# strings uImage.buffalo | grep -i "linux\|kernel"
Linux-2.6.16.16-arm1
Uncompressing Linux...
done, booting the kernel.

やはりカーネル2.6.16。5年以上前のモデルなので当然古い。
これを最新カーネルに入れ替えるのを第一段階の目標とする。