新型 HS-DHGL でハック de 録!!(3)デーモンの起動

HS-DHGL

新型 HS-DHGL でのハックキット 2.1 の検証ができたので、 続いてハック de 録!!。
ハックした HS-DHGL でビデオ録画サーバを作ろうの手順を 順番に実行していく。

続いて デーモンの起動

rc スクリプトの作成

旧形 HS-DHGL から持ってきた。
hackkit:/mnt/buffalo/etc/melco# cd /etc/init.d/
hackkit:/etc/init.d# ftp sil.yamasita.jp
Connected to sil.yamasita.jp.
220 sil FTP server (GNU inetutils 1.5) ready.
Name (sil.yamasita.jp:yasunari):
331 Password required for yasunari.
Password:
230- Linux sil 2.6.16.16-arm1 #9 Wed Mar 7 14:17:36 JST 2007 armv5tejl
230-
230- The programs included with the Debian GNU/Linux system are free software;
230- the exact distribution terms for each program are described in the
230- individual files in /usr/share/doc/*/copyright.
230-
230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
230- permitted by applicable law.
230 User yasunari logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /etc/init.d/
250 CWD command successful.
ftp> get buffalodaemon
local: buffalodaemon remote: buffalodaemon
200 PORT command sucessful.
150 Opening BINARY mode data connection for 'buffalodaemon' (884 bytes).
226 Transfer complete.
884 bytes received in 0.00 secs (309.5 kB/s)
ftp> bye
221 Goodbye.
hackkit:/etc/init.d#
usblp.ko などを insmod しているステップは消しておく。

自動起動の設定

電源ONで自動起動するよう設定する。
hackkit:~# cd /etc/init.d/
hackkit:/etc/init.d# cd ..
hackkit:/etc# ln -s ../init.d/buffalodaemon rc0.d/K10buffalodaemon
hackkit:/etc# ln -s ../init.d/buffalodaemon rc6.d/K10buffalodaemon
hackkit:/etc# ln -s ../init.d/buffalodaemon rc2.d/S90buffalodaemon
hackkit:/etc# ls -l  */*buffalodaemon*
-rwxr-xr-x 1 root root 449 Feb  9 16:27 init.d/buffalodaemon
lrwxrwxrwx 1 root root  23 Feb  9 23:35 rc0.d/K10buffalodaemon -> ../init.d/buffalodaemon
lrwxrwxrwx 1 root root  23 Feb  9 23:35 rc2.d/S90buffalodaemon -> ../init.d/buffalodaemon
lrwxrwxrwx 1 root root  23 Feb  9 23:35 rc6.d/K10buffalodaemon -> ../init.d/buffalodaemon
hackkit:/etc#

手動で起動

hackkit:/etc/init.d# 
/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
Start services: EPGd iRCommander
EPGd : version 1.1.0
0.2.0
Starting clientUtil_server:starting on eth0
Starting services: rarpd tftpd rarpcfgd fwupdated.
hackkit:/etc/init.d# HwCtrlPid = [4971]
ps で確認する。
hackkit:/etc/init.d# ps -aef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 11:49 ?        00:00:05 init [2]
root         2     1  0 11:49 ?        00:00:00 [ksoftirqd/0]
root         3     1  0 11:49 ?        00:00:00 [events/0]
root         4     1  0 11:49 ?        00:00:00 [khelper]
root         5     1  0 11:49 ?        00:00:00 [kthread]
root        11     5  0 11:49 ?        00:00:00 [kblockd/0]
root        14     5  0 11:49 ?        00:00:00 [khubd]
root        29     1  0 11:49 ?        00:00:00 [crypto]
root        30     1  0 11:49 ?        00:00:00 [crypto_ret]
root        51     5  0 11:49 ?        00:00:00 [pdflush]
root        52     5  0 11:49 ?        00:00:00 [pdflush]
root        54     5  0 11:49 ?        00:00:00 [aio/0]
root        53     1  0 11:49 ?        00:00:00 [kswapd0]
root        55     5  0 11:49 ?        00:00:00 [xfslogd/0]
root        56     5  0 11:49 ?        00:00:00 [xfsdatad/0]
root       180     5  0 11:49 ?        00:00:00 [scsi_eh_0]
root       181     5  0 11:49 ?        00:00:00 [scsi_eh_1]
root       194     1  0 11:49 ?        00:00:00 [mtdblockd]
root       223     5  0 11:49 ?        00:00:00 [xfsbufd]
root       224     5  0 11:49 ?        00:00:00 [xfssyncd]
root       419     1  0 11:49 ?        00:00:00 [kjournald]
root       421     5  0 11:49 ?        00:00:00 [xfsbufd]
root       422     5  0 11:49 ?        00:00:00 [xfssyncd]
root       564     1  0 11:49 ?        00:00:00 /bin/sh /usr/local/sbin/kernelmon
root       580   564  0 11:49 ?        00:00:00 cat /proc/buffalo/kernevnt
root       585     1  0 11:49 ?        00:00:00 /sbin/syslogd
root       591     1  0 11:49 ?        00:00:00 /sbin/klogd -x
root       604     1  0 11:49 ?        00:00:00 /usr/sbin/dhcpd -q
102        650     1  0 11:49 ?        00:00:00 /usr/sbin/exim4 -bd -q30m
daemon     664     1  0 11:49 ?        00:00:00 lpd Waiting
root       680     1  0 11:49 ?        00:00:00 /usr/sbin/inetd
root       687     1  0 11:49 ?        00:00:00 /usr/sbin/nmbd -D
root       689     1  0 11:49 ?        00:00:00 /usr/sbin/smbd -D
root       708   689  0 11:49 ?        00:00:00 /usr/sbin/smbd -D
ntp        721     1  0 11:49 ?        00:00:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 100:104 -g
daemon     733     1  0 11:49 ?        00:00:00 /usr/sbin/atd
root       740     1  0 11:49 ?        00:00:00 /usr/sbin/cron
root       770     1  0 11:49 ttyS0    00:00:00 /sbin/getty -L ttyS0 115200 vt100
root       853   680  0 12:27 ?        00:00:00 in.telnetd: x60w.yamasita.jp
root       854   853  0 12:27 pts/0    00:00:00 login -h x60w.yamasita.jp -p
yasunari   855   854  0 12:27 pts/0    00:00:01 -bash
root       874   855  0 12:27 pts/0    00:00:00 su - root
root       875   874  0 12:27 pts/0    00:00:00 -su
root      1042     1  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd
root      1044  1042  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd
root      1045  1042  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd
root      1046  1042  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd
root      1047  1042  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd
root      1050     1  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd -f /etc/apache/httpd8080.conf
root      1051  1050  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd -f /etc/apache/httpd8080.conf
root      1053  1050  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd -f /etc/apache/httpd8080.conf
root      1054  1050  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd -f /etc/apache/httpd8080.conf
root      1056  1050  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd -f /etc/apache/httpd8080.conf
root      1058  1042  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd
root      1059  1050  0 13:34 ?        00:00:00 /usr/local/apache/bin/httpd -f /etc/apache/httpd8080.conf
root      1124     1  1 13:34 ?        00:00:03 /usr/local/PCast/Scheduler
root      1127     1  0 13:34 ?        00:00:00 /usr/local/PCast/pcastd
root      1128  1127  0 13:34 ?        00:00:00 /usr/local/PCast/pcastd
root      1252     1  0 13:34 pts/0    00:00:01 /usr/mediaserver/mediaserver
root      1292     1  1 13:35 pts/0    00:00:02 /bin/sh /usr/local/bin/chk_mediaserver.sh
root      1305     1  0 13:35 ?        00:00:00 /usr/local/PCast/EPGd
root      1311     1  0 13:35 ?        00:00:00 /usr/local/PCast/iRCommander
root      1334     1  0 13:35 pts/0    00:00:00 /usr/local/sbin/clientUtil_server -i eth0
root      1341     1  0 13:35 ?        00:00:00 /usr/local/BootServer/rarpd
root      1349     1  0 13:35 ?        00:00:00 /usr/local/BootServer/fwupdated
root      1350     1  0 13:35 ?        00:00:00 /usr/local/BootServer/tftpd
root      1354     1  0 13:35 ?        00:00:00 /usr/local/BootServer/rarpcfgd
root      1450  1124  0 13:35 ?        00:00:00 /usr/local/PCast/Scheduler
root      3601  1292  0 13:38 pts/0    00:00:00 sleep 1
root      3602   875  0 13:38 pts/0    00:00:00 ps -aef
hackkit:/etc/init.d#
apache, Scheduler, pcastd, mediaserver, EPGd, iRCommander, clientUtil_server, rarpd, tftpd, rarpcfgd, fwupdated が動作している。

次は、、、
ビデオキャプチャボックスの接続と確認なのだが、 キャプチャボックスは2つとも録画予約が入っているしなぁ、、、




HS-DH320GL
楽天市場
Yahoo!ショッピング
somap.com
TSUKUMO ネットショップ
ValuMore!
ムラウチドットコム
アット・ニフティストア icon
Joshin web icon


LS-LGLシリーズ ファームウェア アップデータ Ver.1.04
ハックの記録
LinkStation/玄箱 をハックしよう

ポチッ / I ordered a LS-H250GL

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