Hi,
Sometimes when I run USBnetwork I want to know which mode it switched to. This is because for some reason on my Kindle a kite script will be run automatically (I think it may the the last one that I ran beacause maybe Kindle refreshes or reoopen the last "book").
Anyway, I modified the USB network script to do the following - display which mode it is going to (using eips).
Please see the below:
Code:
#!/bin/sh
kitersrc=/mnt/base-us/kite/.rsrc
kiteconfig=/mnt/base-us/kite/config
usbipv4=`head -1 $kiteconfig/usbipv4`
if lsmod|grep -q g_ether; then
eips 10 11 "**** To Storage Mode ****"
pkill xinetd
rmmod g_ether
modprobe g_file_storage
else
eips 10 11 "**** To Ethernet Mode ****"
rmmod g_file_storage
modprobe g_ether
ifconfig usb0 $usbipv4
mount /mnt/base-us -o remount,exec
$kitersrc/sbin/xinetd
fi
Thanks,
James