On Fri, 21 Nov 2014 11:23:20 -0800
John Jason Jordan <[email protected]> dijo:

>That was the trick. I replaced both with ifup and ifdown, and now it
>reconnects:
>
>#!/bin/bash
>sudo ifdown eth1
>wget -qO - http://192.168.0.1/DATALOG | grep 'DATALOG.*fname' | sed -e
>"s/^.*fname\"\:\"//" -e "s/\", \"fsize.*//" | while read line; do
>cd /home/jjj/CPAP/Resmed/DATALOG; wget -nc
>"http://192.168.0.1/DATALOG/$line";done 
>sudo ifup eth1

I can browse to the card with my phone, and this morning it shows that
there are eight new files on the card from last night, but the script
did nothing. It worked yesterday, so wth?

One thing that might help is adding a verbose option to the commands
that will hopefully pop up messages. Lacking that however, I decided to
execute the commands one at a time from a terminal window. I didn't get
far:

jjj@Devil-Bonobo:/$ ifdown eth1
ifdown: failed to open lockfile /run/network/.ifstate.lock: Permission
denied jjj@Devil-Bonobo:/$ sudo ifdown eth1
[sudo] password for jjj: 
ifdown: interface eth1 not configured
jjj@Devil-Bonobo:/$ ifquery eth1
Unknown interface eth1
jjj@Devil-Bonobo:/$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:90:f5:ef:f2:59  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 00:23:54:8c:65:20  
          inet addr:192.168.0.126  Bcast:192.168.0.255
Mask:255.255.255.0 inet6 addr: fe80::223:54ff:fe8c:6520/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32202105 errors:0 dropped:13 overruns:0 frame:0
          TX packets:50768137 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3275791017 (3.2 GB)  TX bytes:40659503509 (40.6 GB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1972012 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1972012 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:176248850 (176.2 MB)  TX bytes:176248850 (176.2 MB)

wlan0     Link encap:Ethernet  HWaddr 00:c2:c6:00:1e:1e  
          inet addr:192.168.0.12  Bcast:192.168.0.255
Mask:255.255.255.0 inet6 addr: fe80::2c2:c6ff:fe00:1e1e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:565691 errors:0 dropped:0 overruns:0 frame:0
          TX packets:580439 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:186193004 (186.1 MB)  TX bytes:81204345 (81.2 MB)
jjj@Devil-Bonobo:/$ sudo ifconfig eth1 down
jjj@Devil-Bonobo:/$ sudo ifconfig eth1 up

Note above that the ifconfig commands worked, but the ifdown and ifup
commands fail, even from the terminal with sudo. I could swear that
they worked yesterday. And apparently I need to fix the sudoers file so
that it includes ifup and ifdown. The big puzzle is why ifdown and ifup
think that eth1 does not exist. Any ideas?
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to