Hack BBS

[全部のスレッド一覧][新規投稿][記事の削除・変更] [Home Page]

返信投稿はタイトルのリンクをクリックして下さい
スレッド【No.4731】の中の記事をすべて表示しています

【No.4731】のスレッド
07/08/08(水) 23:12:50 投稿者[gox] [No.4731]のスレッド内
【No.4731】 タイトル[HD-HLANに延長対応ハックdeまる録!! でエラー] この記事がスレッドの最初です
機種:HD-H300LAN
ファームウェア:1.54

度々の質問失礼します。

以下のページを参考に、ハックdeまる録!!をtelnetを有効にしたファームウェアv1.54のHD-H300LANに導入しました。
http://yamasita.jp/linkstation/HackKit/hackderokku/hackdemarurokuV3.html

まず、地域、チャンネル、キーワードを設定した後、

# sh /usr/local/sbin/hackdemarurokuV3.sh

で動作確認をし、いくつかの番組がpcastのページに予約されたのを確認しました。

その後、予約された番組をすべて削除し、

# crontab -e



20 5 * * * /bin/sh /usr/local/sbin/hackdemarurokuV3.sh 2>>/tmp/hackdemaruroku.log 1>>/tmp/hackdemaruroku.log

を登録し、20 5 の部分を現在時刻の2.3分後に設定し、クロンジョブで番組が追加されるかどうか見てみました。

結果、予約は追加されず、以下が /tmp/hackdemaruroku.log の内容となっています。


# cat /tmp/hackdemaruroku.log
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/usr/local/sbin/hackdemarurokuV3.sh: wget: command not found
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
sed: can't read /tmp/hackdemaruroku.29175: No such file or directory
/tmp/hackdemaruroku_20070808 not found


今回使用しているHD−H300LANには、telnetの他に、玄箱CDから以下のバイナリをインストールしています。

binutils-2.10.91.0.2.tar.gz
gcc-2.95.3.tar.gz
make-3.79.1.tar.gz
textutils-2.0.tar.gz
autoconf-2.13.tar.gz
automake-1.4p4.tar.gz
g++-2.95.3.tar.gz
glibc-2.2.3.tar.gz

そして、http://www.ring.gr.jp/archives/GNU/wget/wget-1.10.2.tar.gz からwgetのソースを入手しコンパイルしています。wgetは動作確認済みです。

# wget http://www.google.com
--23:04:30-- http://www.google.com/
=> `index.html'
Resolving www.google.com... 66.249.89.99, 66.249.89.104, 66.249.89.147
Connecting to www.google.com|66.249.89.99|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.google.co.jp/ [following]
--23:04:31-- http://www.google.co.jp/
=> `index.html'
Resolving www.google.co.jp... 66.249.89.99, 66.249.89.104, 66.249.89.147
Reusing existing connection to www.google.com:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[ <=> ] 3,422 --.--K/s

23:04:31 (12.75 MB/s) - `index.html' saved [3422]

何が問題かわかる方おられますでしょうか?

07/08/10(金) 01:15:45 投稿者[山下康成] [No.4731]のスレッド内
【No.4732】 タイトル[Re: HD-HLANに延長対応ハックdeまる録!! でエラー] 【No.4731】に対する返信
よくやるんですよねぇ(汗)。
ログインして手動で実行するとちゃんと動くのに、
cron に仕掛けて(夜間バッチで)実行すると失敗。
実は、昨日も私のところのメンバがやらかしてました。
今日、もう一回仕掛け直して明日確認するとか。

で、原因はたいていは環境の違い。
・実行ユーザが違う
同じユーザの場合
・LANG が違う
・PATH が違う
・タイムゾーンが違う
  :
  :

もうお分かりですね。

> /usr/local/sbin/hackdemarurokuV3.sh: wget: command not found

頑張ってください。

07/08/13(月) 07:36:35 投稿者[gox] [No.4731]のスレッド内
【No.4735】 タイトル[解決!!] 【No.4732】に対する返信
山下さんありがとうございます。おかげさまでできました。

解決方法ですが、/usr/local/sbin/hackdemarurokuV3.sh を編集しました。

まず、

wget 'http://www.ontvjapan.com/genre/detail.php3?tikicd='$TIKICD$



/usr/local/bin/wget 'http://www.ontvjapan.com/genre/detail.php3?tikicd='$TIKICD$

とし、

PROGRAMLIST=/tmp/hackdemaruroku_$D
TMPFILE=/tmp/hackdemaruroku.$$



PROGRAMLIST=/mnt/spool/tmp/hackdemaruroku_$D
TMPFILE=/mnt/spool/tmp/hackdemaruroku.$$

でいけました。

wgetのパスの問題と、tmpディレクトリが、ファームウェアv1.54の場合 /mnt/spool/tmp になっているのでそれを指定することで解決いたしました。

# ls -ld /tmp
lrwxrwxrwx 1 root root 13 Aug 7 04:28 /tmp -> mnt/spool/tmp