#1866: Pointless warning when running "ifdown" for a manually-configured
interface
--------------------------------------------+-------------------------------
Reporter: [EMAIL PROTECTED] | Owner: [email protected]
Type: task | Status: new
Priority: lowest | Milestone: 6.3
Component: Book | Version: SVN
Severity: normal | Resolution:
Keywords: |
--------------------------------------------+-------------------------------
Comment (by [EMAIL PROTECTED]):
For bringing down interfaces, rather than looking at the configuration
files, how about the following:
{{{
#get a list of available interfaces
interfaces=`ip link show | grep ^[[:digit:]].*,UP | cut -f2 -d:`
#bring each interface down
for iface in interfaces; do
ip link set $iface down;
done;
}}}
I'm not quite sure how to handle bringing interfaces up automatically
though. Maybe it's just a case of doing the following for each interface
that `ip link show` reports:
1) If the interface is blacklisted (I haven't thought of any possible
configuration interfaces for this yet), i.e. the user explicitly doesn't
want it to be brought up, don't do anything
2) If the interface isn't blacklisted and has an /etc/sysconfig/network-
devices/ifconfig.${iface} file, bring it up
3) If the interface isn't blacklisted and doesn't have an /etc/sysconfig
/network-devices/ifconfig.${iface} file fallback to a system-wide default
configuration, such as DHCP.
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/1866#comment:6>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page