
Quick Links:
Empeg FAQ
|
RioCar.Org
|
Hijack
|
BigDisk Builder
|
jEmplode
|
emphatic
Repairs: Repairs
|
#264409 - 05/09/2005 15:22
Re: Scripted telnet access from Windows
[Re: genixia]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14510
Loc: Canada
|
Quote:
I also used expect to modify my hijack Makefile - I modified the 'install' target to call an expect script that would ftp hijack to my player and reboot it if successful.
My install script does something similar, but without expect. It actually performs a full readback of the kernel from flash and compares with the original to ensure correct flash contents before rebooting:
Quote:
echo "Sending kernel.." ftp -n >/dev/null <<-EOF open $IP
#passive site popup 99 Downloading kernel.. put $ZIMAGE /proc/empeg_kernel site popup 99 Waiting for readback.. get /proc/empeg_kernel /tmp/junk site popup 0 Done. quit EOF bytes=`ls -l $ZIMAGE|awk '{print $5}'` dd if=/tmp/junk bs=$bytes count=1 2>/dev/null | diff $ZIMAGE - if [ "$?" = "0" ]; then echo "Success!" else echo "FAILED -- try again!" exit 1 fi rm -f /tmp/junk 2>/dev/null echo "Rebooting.." ftp >/dev/null <<-EOF open $IP
site reboot EOF
|
Top
|
|
|
|
|
|
|