xinglp wrote: > 在 2012年3月31日 上午12:05,Bruce Dubbs <bruce.du...@gmail.com> 写道: >> xinglp wrote: >>> http://www.linuxfromscratch.org/lfs/view/development/scripts/apds27.html >>> >>> if [ "$(ip addr show ${IFACE} | grep 'inet ')" != "" ]; then >>> log_info_msg "Bringing down the ${IFACE} interface..." >>> ip link set ${IFACE} down >>> evaluate_retval >>> fi >>> >>> should be >>> >>> if [ "$(ip addr show ${IFACE} | grep 'inet ')" == "" ]; then >>> log_info_msg "Bringing down the ${IFACE} interface..." >>> ip link set ${IFACE} down >>> evaluate_retval >>> fi
>> I'm missing something here. Why would we need to set an interface down >> if the inet line is null? > Maybe more than one address have been set to this > interface(ipv4-static dhcp pppoe etc...) OK, I remember now. I'll fix it. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page