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

arekm cvs at pld-linux.org
Tue Aug 23 18:26:57 CEST 2005


Author: arekm
Date: Tue Aug 23 18:26:48 2005
New Revision: 6327

Modified:
   rc-scripts/trunk/rc.d/init.d/network
Log:
[a-z] doesn't always mean whole alphabet (for example et_EE locale). Use C locale when searching. (Patch by Elan Ruusamäe)


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	Tue Aug 23 18:26:48 2005
@@ -134,7 +134,7 @@
 		. /etc/rc.d/init.d/functions; \
 		cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
 		egrep -v '(ifcfg-lo|ifcfg-sit|ifcfg-atm|ifcfg-lec|ifcfg-nas|ifcfg-br|ifcfg-(.*)\.(.*))' | \
-		egrep 'ifcfg-[a-z0-9\.]+$' | \
+		LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
 		for i in `cat`; do \
 		    ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; is_yes "$ONBOOT" && echo "$i"; \
 		done | \
@@ -143,7 +143,7 @@
 		. /etc/rc.d/init.d/functions; \
 		cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
 		egrep 'ifcfg-(.*)\.(.*)' | \
-		egrep 'ifcfg-[a-z0-9\.]+$' | \
+		LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
 		for i in `cat`; do \
 		    ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; is_yes "$ONBOOT" && echo "$i"; \
 		done | \
@@ -151,7 +151,7 @@
 	interfaces_br_boot=$((
 		. /etc/rc.d/init.d/functions; \
 		cd /etc/sysconfig/interfaces && ls -1 ifcfg-br* | \
-		egrep 'ifcfg-[a-z0-9\.]+$' | \
+		LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
 		for i in `cat`; do \
 		    ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; is_yes "$ONBOOT" && echo "$i"; \
 		done | \
@@ -159,7 +159,7 @@
 	interfaces_sit_boot=$((
 		. /etc/rc.d/init.d/functions; \
 		cd /etc/sysconfig/interfaces && ls -1 ifcfg-sit* | \
-		egrep 'ifcfg-[a-z0-9]+$' | \
+		LC_ALL=C egrep 'ifcfg-[a-z0-9]+$' | \
 		for i in `cat`; do \
 		    ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; is_yes "$ONBOOT" && echo "$i"; \
 		done | \
@@ -167,7 +167,7 @@
 fi
 tunnels=$((cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | \
 	xargs egrep -l "ONBOOT=[^n][^o]" | \
-	egrep 'tnlcfg-[a-z0-9]+$' | \
+	LC_ALL=C egrep 'tnlcfg-[a-z0-9]+$' | \
 	awk ' { gsub(/tnlcfg-/,NIL); print $0 } ') 2> /dev/null)
 
 # See how we were called.



More information about the pld-cvs-commit mailing list