Re: 第三世代 LinkStation ハックキットでハック de 録!!(3)デーモンの起動

HS-DHGL

背景

HS-DHGL の 第三世代 LinkStation ハックキット ハック de 録!!が実現できれば、 LS-GL/HS-DHGL ハックキットの役目を終わらせられると 第三世代 LinkStation ハックキット ハック de 録!! 動かす努力をしてみた。
残念ながら挫折してしまったが、、、、少し敷居を下げて再挑戦する。

続いて デーモンの起動

rc スクリプトの作成

slam:~# vi /etc/init.d/buffalodaemon
	:
	:
slam:~# cat !$
cat /etc/init.d/buffalodaemon
#!/bin/sh

case "$1" in
  start)
        chroot /usr/local/buffalo mount /proc

        for prog in httpd.sh pcastd.sh epg.sh clientUtil_servd.sh ltbootd.sh
        do
                chroot /usr/local/buffalo etc/init.d/$prog start
        done
        ;;
  stop)
        for prog in ltbootd.sh clientUtil_servd.sh epg.sh pcastd.sh httpd.sh
        do
                chroot /usr/local/buffalo etc/init.d/$prog stop
        done

        chroot /usr/local/buffalo umount /proc
        ;;
  *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit 0

slam:~# chmod 755 /etc/init.d/buffalodaemon
slam:~#

手動で起動

slam:~# /etc/init.d/buffalodaemon start
start
Starting HTTPD services: /usr/local/apache/bin/apachectl start: httpd started

killall: chk_mediaserver.sh: no process killed
Start services: pcastd scheduler
pcastd 0.5.9  start.
key='server', value='on'
key='media', value='/mnt/disk1/share/videos'
Set pcast_mp2000 seting media=global_param.public_root
key='usbdisk', value='1'
key='limit_media', value=''
key='limit_pass', value=''
EOF Detect.
config '/etc/pcast/pcastd.conf' open.
key='server_port', value='8000'
key='client_language_code', value='sjis'
key='skin_root', value='/etc/pcast/theme/pcast'
key='us_skin_root', value='/etc/pcast/theme_us/pcast'
key='flag_unknown_extention_file_hide', value='true'
key='flag_image_viewer', value='false'
key='flag_daemon', value='true'
key='flag_debug_log_output', value='false'
key='debug_log_filename', value='/mnt/disk1/_share/pcastd_debug.log'
EOF Detect.
Daemoning....
killall: mt-daapd: no process killed
Start services: mediaserver
etc/init.d/pcastd.sh: line 181:   833 Killed                  /usr/local/bin/watch_mediaserver.sh >/dev/null 2>&1

Start services: EPGd iRCommander
EPGd : version 1.1.0
0.2.0
Starting clientUtil_server:starting on eth0
Starting services: rarpd tftpd rarpcfgd fwupdated.
slam:~# HwCtrlPid = [1467]

自動起動の設定

slam:~# cd /etc
slam:/etc# ln -s ../init.d/buffalodaemon rc0.d/K10buffalodaemon
slam:/etc# ln -s ../init.d/buffalodaemon rc6.d/K10buffalodaemon
slam:/etc# ln -s ../init.d/buffalodaemon rc2.d/S90buffalodaemon
slam:/etc# ls -l */*buffalodaemon*
-rwxr-xr-x 1 root root 449 Apr 30 22:46 init.d/buffalodaemon
lrwxrwxrwx 1 root root  23 Apr 30 22:51 rc0.d/K10buffalodaemon -> ../init.d/buffalodaemon
lrwxrwxrwx 1 root root  23 Apr 30 22:51 rc2.d/S90buffalodaemon -> ../init.d/buffalodaemon
lrwxrwxrwx 1 root root  23 Apr 30 22:51 rc6.d/K10buffalodaemon -> ../init.d/buffalodaemon
slam:/etc#

確認

slam:/etc# ps -aux
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  1.0  0.5   1968   712 ?        S    22:44   0:05 init [2]
root         2  0.0  0.0      0     0 ?        SN   22:44   0:00 [ksoftirqd/0]
root         3  0.0  0.0      0     0 ?        S<   22:44   0:00 [events/0]
root         4  0.0  0.0      0     0 ?        S<   22:44   0:00 [khelper]
root         5  0.0  0.0      0     0 ?        S<   22:44   0:00 [kthread]
root        11  0.0  0.0      0     0 ?        S<   22:44   0:00 [kblockd/0]
root        14  0.0  0.0      0     0 ?        S<   22:44   0:00 [khubd]
root        29  0.0  0.0      0     0 ?        S    22:44   0:00 [crypto]
root        30  0.0  0.0      0     0 ?        S    22:44   0:00 [crypto_ret]
root        51  0.0  0.0      0     0 ?        S    22:44   0:00 [pdflush]
root        52  0.0  0.0      0     0 ?        S    22:44   0:00 [pdflush]
root        54  0.0  0.0      0     0 ?        S<   22:44   0:00 [aio/0]
root        55  0.0  0.0      0     0 ?        S<   22:44   0:00 [xfslogd/0]
root        56  0.0  0.0      0     0 ?        S<   22:44   0:00 [xfsdatad/0]
root       180  0.0  0.0      0     0 ?        S<   22:44   0:00 [scsi_eh_0]
root       181  0.0  0.0      0     0 ?        S<   22:44   0:00 [scsi_eh_1]
root        53  0.0  0.0      0     0 ?        S    22:44   0:00 [kswapd0]
root       194  0.0  0.0      0     0 ?        S    22:44   0:00 [mtdblockd]
root       222  0.0  0.0      0     0 ?        S<   22:44   0:00 [xfsbufd]
root       223  0.0  0.0      0     0 ?        S<   22:44   0:00 [xfssyncd]
root       374  0.0  0.1   1544   176 ?        Ss   22:44   0:00 logsave -s /var/log/fsck/checkfs fsck -C -R
root       383  0.0  0.0      0     0 ?        S    22:44   0:00 [kjournald]
root       385  0.0  0.0      0     0 ?        S<   22:44   0:00 [xfsbufd]
root       386  0.0  0.0      0     0 ?        S<   22:44   0:00 [xfssyncd]
root       508  0.0  0.9   2812  1196 ?        S    22:44   0:00 /bin/sh /usr/local/sbin/kernelmon
root       516  0.0  0.3   1552   392 ?        S    22:44   0:00 cat /proc/buffalo/kernevnt
root       519  0.0  1.0  27384  1312 ?        Sl   22:44   0:00 /usr/sbin/rsyslogd -c3
root       541  0.0  0.4   1816   608 ?        Ss   22:44   0:00 /usr/sbin/inetd
root       552  0.0  1.3   7372  1692 ?        Ss   22:44   0:00 /usr/sbin/nmbd -D
root       554  0.0  2.3  13276  2968 ?        Ss   22:44   0:00 /usr/sbin/smbd -D
root       561  0.0  0.8  13276  1068 ?        S    22:44   0:00 /usr/sbin/smbd -D
ntp        566  0.0  1.0   4736  1344 ?        Ss   22:44   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 102:
root       588  0.0  0.6   2136   776 ?        Ss   22:44   0:00 /usr/sbin/cron
root       605  0.0  0.4   1560   528 ttyS0    Ss+  22:44   0:00 /sbin/getty -L ttyS0 115200 vt100
telnetd    633  0.0  0.6   1876   796 ?        Rs   22:47   0:00 in.telnetd: uxl.yamasita.jp
root       634  0.0  0.9   2948  1216 pts/0    Ss   22:47   0:00 login -h uxl.yamasita.jp -p
yasunari   635  0.0  1.4   3428  1796 pts/0    S    22:47   0:00 -bash
root       640  0.0  0.8   2644  1072 pts/0    S    22:47   0:00 su - root
root       641  0.0  1.2   2936  1588 pts/0    S    22:47   0:00 -su
root       658  0.0  0.7   3204   924 ?        Ss   22:49   0:00 /usr/local/apache/bin/httpd
root       660  0.0  0.5   3272   672 ?        S    22:49   0:00 /usr/local/apache/bin/httpd
root       661  0.0  0.5   3272   672 ?        S    22:49   0:00 /usr/local/apache/bin/httpd
root       662  0.0  0.5   3272   672 ?        S    22:49   0:00 /usr/local/apache/bin/httpd
root       663  0.0  0.5   3272   672 ?        S    22:49   0:00 /usr/local/apache/bin/httpd
root       666  0.0  0.7   3204   928 ?        Ss   22:49   0:00 /usr/local/apache/bin/httpd -f /etc/apache/
root       668  0.0  0.5   3272   676 ?        S    22:49   0:00 /usr/local/apache/bin/httpd -f /etc/apache/
root       669  0.0  0.5   3272   676 ?        S    22:49   0:00 /usr/local/apache/bin/httpd -f /etc/apache/
root       670  0.0  0.5   3272   676 ?        S    22:49   0:00 /usr/local/apache/bin/httpd -f /etc/apache/
root       671  0.0  0.5   3272   676 ?        S    22:49   0:00 /usr/local/apache/bin/httpd -f /etc/apache/
root       674  0.0  0.5   3272   676 ?        S    22:49   0:00 /usr/local/apache/bin/httpd
root       675  0.0  0.5   3272   680 ?        S    22:49   0:00 /usr/local/apache/bin/httpd -f /etc/apache/
root       715  1.6  5.2  42944  6636 ?        Ssl  22:49   0:02 /usr/local/PCast/Scheduler
root       718  0.0  0.4   5324   536 ?        S    22:50   0:00 /usr/local/PCast/pcastd
root       719  0.0  0.5   5324   660 ?        S    22:50   0:00 /usr/local/PCast/pcastd
root       834  0.6  7.5  11112  9548 pts/0    SNLl 22:50   0:00 /usr/mediaserver/mediaserver
root       855  1.5  0.8   2112  1060 pts/0    S    22:50   0:02 /bin/sh /usr/local/bin/chk_mediaserver.sh
root      1409  0.0  0.4   3016   524 ?        Ss   22:50   0:00 /usr/local/PCast/EPGd
root      1411  0.0  0.4   3612   540 ?        Ss   22:50   0:00 /usr/local/PCast/iRCommander
root      1427  0.0  0.2   1876   272 pts/0    S    22:50   0:00 /usr/local/sbin/clientUtil_server -i eth0
root      1435  0.0  0.2  17936   372 ?        Ssl  22:50   0:00 /usr/local/BootServer/rarpd
root      1436  0.0  0.2   9736   360 ?        Ssl  22:50   0:00 /usr/local/BootServer/rarpcfgd
root      1437  0.0  0.1   1412   220 ?        Ss   22:50   0:00 /usr/local/BootServer/fwupdated
root      1440  0.0  0.1   1544   196 ?        Ss   22:50   0:00 /usr/local/BootServer/tftpd
root      1467  0.0  0.8  38036  1044 ?        Sl   22:50   0:00 /usr/local/PCast/Scheduler
root      2804  0.0  0.3   2804   412 pts/0    S    22:52   0:00 sleep 1
root      2805  0.0  0.7   2476   956 pts/0    R+   22:52   0:00 ps -aux
slam:/etc#
大丈夫そう。


HS-DHGL
バッファローダイレクト
楽天市場
Yahoo!ショッピング
somap.com
ValuMore!
ムラウチドットコム


Re: 第三世代 LinkStation ハックキットでハック de 録!!(2)設定変更
ハックの記録
LinkStation/玄箱 をハックしよう

Re: 第三世代 LinkStation ハックキットでハック de 録!!(4)ビデオキャプチャボックスの接続と確認

Copyright (C) 2003-2009 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市