I did find some new info
1. Kindle 3g does not support the post-up command in /etc/network/interfaces: you have to use "up"
2. when running there, there is no path:
Code:
iface wlan0 inet dhcp
up /etc/network/if-post-up.d/stora >> /mnt/us/documents/test.txt
results in
Code:
tail -f /mnt/us/documents/test.txt
METHOD=dhcp
MODE=start
ADDRFAM=inet
PATH=
IFACE=wlan0
PWD=/
=== So here is what I have working
Code:
[root@kindle network]# cat /etc/network/interfaces
# Configure Loopback
auto lo
iface lo inet loopback
auto usb0
iface usb0 inet dhcp
iface bnep0 inet dhcp
iface eth0 inet dhcp
iface wlan0 inet dhcp
up /etc/network/if-post-up.d/stora >> /mnt/us/documents/test.txt
And my script
Code:
[root@kindle network]# cat /etc/network/if-post-up.d/stora
#!/bin/sh +x
if [[ -z "$PATH" ]]; then
PATH=/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin
else
PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin
fi
if [[ "$IFACE" != "wlan0" ]]; then
echo "Skipping $IFACE"
return 0;
fi
env
echo "Woo"
return 0;
Now I need to get a way to extract some Unique ID out of my books in teh documents folder, and send them to my fileserver
And I need a reliable way to connect to my server, because dns isn't available when the if-up script runs.