rc-scripts/trunk/rc.d/init.d/network

baggins cvs at pld-linux.org
Fri Oct 28 16:54:30 CEST 2005


Author: baggins
Date: Fri Oct 28 16:54:28 2005
New Revision: 6501

Modified:
   rc-scripts/trunk/rc.d/init.d/network
Log:
- ignore non-empty but commented /etc/mactab (patch by glen)


Modified: rc-scripts/trunk/rc.d/init.d/network
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/network	(original)
+++ rc-scripts/trunk/rc.d/init.d/network	Fri Oct 28 16:54:28 2005
@@ -57,7 +57,9 @@
 modprobe_net
 
 # Setup interfaces names
-[ -x /sbin/nameif -a -f /etc/mactab ] && run_cmd "Setting interfaces names (nameif)" /sbin/nameif
+if [ -x /sbin/nameif -a -f /etc/mactab ] && [ $(egrep -vs '^(#| *$)' /etc/mactab | wc -l) -gt 0 ]; then
+	run_cmd "Setting interfaces names (nameif)" /sbin/nameif
+fi
 
 # Kernel network parameters
 sysctl -e -p /etc/sysctl.conf > /dev/null 2>&1



More information about the pld-cvs-commit mailing list