View Single Post
Old 03-21-2014, 01:09 AM   #2
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
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.

Last edited by coplate; 03-21-2014 at 01:39 AM.
coplate is offline   Reply With Quote