ifdown
David Henderson
dhenderson at digital-pipe.com
Fri Jun 17 14:17:16 UTC 2011
On 06/16/2011 01:25 PM, David Henderson wrote:
> Hello everyone! I'm working some more with the 'if*' commands and
> come across an issue and wanted to ask about it here. I have a script
> that calls 'ifdown' for an adapter like: ifdown -f lan01 && echo
> success || echo failure. I noticed that it wasn't executing correctly
> so I performed the step manually from the command line like:
>
> # ifdown lan01 && echo success || echo failure
> ifdown: interface lan01 not configured
> success
> # ifconfig
> lan01 Link encap:Ethernet HWaddr 00:27:0E:17:99:35
> inet addr:192.168.0.198 Bcast:192.168.0.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:340 errors:0 dropped:0 overruns:0 frame:0
> TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:34257 (33.4 KiB) TX bytes:15911 (15.5 KiB)
> Memory:d0d00000-d0d20000
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:16436 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:0
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>
> I see two issues right off the top. First, as you can see, the lan01
> interface does exist but isn't seen by 'ifdown', and second, it's exit
> status doesn't appear to be correct as it should have shown 'failure'
> instead of 'success'. Currently I'm working around the issue by
> calling 'ifconfig lan01 down' which does work correctly. Any ideas as
> to what's going on here? These are all busybox applets, btw.
>
> Thanks,
> Dave
bump for help
More information about the busybox
mailing list