File sysconfig-netconfig-locale-regex-fixes.bnc488257.diff of Package sysconfig

--- scripts/functions.netconfig
+++ scripts/functions.netconfig	2009/04/06 15:18:25
@@ -193,7 +193,8 @@ netconfig_check_md5_and_move()
 
 netconfig_kv_filter()
 {
-	awk -- '/^[[:space:]]*$/ { next; }
+	# force portable "C" locale to match valid identifiers
+	LANG=C LC_ALL=C awk -- '/^[[:space:]]*$/ { next; }
 	/^[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]*='"'"'[^'"'"']*'"'"'[[:space:]]*$/ && \
 	!/^[[:space:]]*_+=/ {
 		sub("^[[:space:]]+", "", $0);
@@ -204,7 +205,7 @@ netconfig_kv_filter()
 		print key"="val;
 		next;
 	}
-	{ print "="NR; exit(NR); }' $@
+	{ print "="NR; exit(NR); }' "$@"
 }
 
 #
--- scripts/netconfig
+++ scripts/netconfig	2009/04/06 14:53:51
@@ -322,7 +322,7 @@ while true ; do
     REGEX=''
     case "$1" in
         -s|--service)   VARIABLE=SERVICE ;
-                        REGEX='^[a-zA-Z0-9_-]+$' ;;
+                        REGEX='^[[:alnum:]_-]+$' ;;
         -i|--interface) VARIABLE=INTERFACE ;
                         REGEX='^[^'"'"'`"\\/[:space:][:cntrl:]]+$' ;;
         -l|--lease-file) VARIABLE=LEASEFILE;;
openSUSE Build Service is sponsored by