miconapl を絶対パスで起動する。
tswxl:~# cd /usr/local/sbin/ tswxl:/usr/local/sbin# mv lcdcontrol{,.orig} tswxl:/usr/local/sbin# sed -e 's;miconapl;/usr/local/sbin/miconapl;' lcdcontrol.orig > lcdcontrol tswxl:/usr/local/sbin# diff -u lcdcontrol{.orig,} --- lcdcontrol.orig 2010-05-25 23:30:26.000000000 +0900 +++ lcdcontrol 2010-05-28 22:52:57.000000000 +0900 @@ -1,33 +1,33 @@ #!/bin/sh -miconapl -a lcd_set_dispitem ipaddress date buffer0 buffer1 buffer2 buffer3 buffer4 buffer5 # buffer6 buffer7 -miconapl -a lcd_changemode_auto +/usr/local/sbin/miconapl -a lcd_set_dispitem ipaddress date buffer0 buffer1 buffer2 buffer3 buffer4 buffer5 # buffer6 buffer7 +/usr/local/sbin/miconapl -a lcd_changemode_auto while : do - miconapl -a lcd_set_hostname `hostname` - miconapl -a lcd_set_ipaddress `ifconfig eth0 | sed -n -e 's/^.*inet addr:\([1-9][0-9\.]*\).*$/\1/p'` + /usr/local/sbin/miconapl -a lcd_set_hostname `hostname` + /usr/local/sbin/miconapl -a lcd_set_ipaddress `ifconfig eth0 | sed -n -e 's/^.*inet addr:\([1-9][0-9\.]*\).*$/\1/p'` # buffer0 load average # 07:58:38 up 1 min, 1 user, load average: 0.12, 0.04, 0.01 loadaverage=`uptime 2>/dev/null | sed -e 's/^.*load average: //'` # 1234567890123456 - miconapl -a lcd_set_buffer0 "load average: $loadaverage" + /usr/local/sbin/miconapl -a lcd_set_buffer0 "load average: $loadaverage" # buffer1 md0 # 012345678901234567890123456789012 # md0 : active raid1 sda1[0] sdb1[1] MD0=`sed -n -e 's/\[[01]\]//g' -e 's/active/active /' -e '/md0 /p' /proc/mdstat` - miconapl -a lcd_set_buffer1 "$MD0" + /usr/local/sbin/miconapl -a lcd_set_buffer1 "$MD0" # buffer2 md1 MD1=`sed -n -e 's/\[[01]\]//g' -e 's/active/active /' -e '/md1 /p' /proc/mdstat` - miconapl -a lcd_set_buffer2 "$MD1" + /usr/local/sbin/miconapl -a lcd_set_buffer2 "$MD1" # buffer3 md2 MD2=`sed -n -e 's/\[[01]\]//g' -e 's/active/active /' -e '/md2 /p' /proc/mdstat` - miconapl -a lcd_set_buffer3 "$MD2" + /usr/local/sbin/miconapl -a lcd_set_buffer3 "$MD2" @@ -39,16 +39,16 @@ case $M in /) # 1234567890123456789012 - miconapl -a lcd_set_buffer4 "/dev/md1 $M $C" + /usr/local/sbin/miconapl -a lcd_set_buffer4 "/dev/md1 $M $C" ;; /mnt) - miconapl -a lcd_set_buffer5 "/dev/md2 $M $C" + /usr/local/sbin/miconapl -a lcd_set_buffer5 "/dev/md2 $M $C" ;; *) ;; esac done - #miconapl -a lcd_set_buffer0 + #/usr/local/sbin/miconapl -a lcd_set_buffer0 sleep 60 tswxl:/usr/local/sbin#しばらく待つと、cron からスクリプトが起動され、無事LCD へ表示された。
|
← 〈スカパー! HD〉、東芝〈レグザ〉の録画に最適、残量メーター搭載、横置のテレビ用ネットワークHDD |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LCD への表示(5) |