SVN: rc-scripts/trunk: Makefile.am configure.ac rc.d/init.d/cryptsetup sysconfig/network-scripts/fun...
glen
glen at pld-linux.org
Fri Jan 23 14:34:04 CET 2009
Author: glen
Date: Fri Jan 23 14:34:03 2009
New Revision: 10091
Modified:
rc-scripts/trunk/Makefile.am
rc-scripts/trunk/configure.ac
rc-scripts/trunk/rc.d/init.d/cryptsetup
rc-scripts/trunk/sysconfig/network-scripts/functions.network
rc-scripts/trunk/sysconfig/network-scripts/ifdown
rc-scripts/trunk/sysconfig/network-scripts/ifdown-br
rc-scripts/trunk/sysconfig/network-scripts/ifdown-vlan
rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases
rc-scripts/trunk/sysconfig/network-scripts/ifup-br
rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan
rc-scripts/trunk/sysconfig/network-scripts/tnldown
rc-scripts/trunk/sysconfig/network-scripts/tnlup
Log:
- force LC_ALL=C when grepping data from possibly localized program outputs
Modified: rc-scripts/trunk/Makefile.am
==============================================================================
--- rc-scripts/trunk/Makefile.am (original)
+++ rc-scripts/trunk/Makefile.am Fri Jan 23 14:34:03 2009
@@ -36,5 +36,5 @@
# make rpms
rpm: $(PACKAGE).spec
$(MAKE) dist
- rpmbin=`LANG=C LC_ALL=C rpm -ta 2>&1 | grep -q "unknown option" && echo rpmbuild || echo rpm` ; \
+ rpmbin=`LC_ALL=C rpm -ta 2>&1 | grep -q "unknown option" && echo rpmbuild || echo rpm` ; \
$$rpmbin -ta --clean --rmsource $(PACKAGE)-$(VERSION).tar.gz
Modified: rc-scripts/trunk/configure.ac
==============================================================================
--- rc-scripts/trunk/configure.ac (original)
+++ rc-scripts/trunk/configure.ac Fri Jan 23 14:34:03 2009
@@ -9,7 +9,7 @@
SHSCRIPTS=""
for shfile in $(find ${srcdir}/rc.d ${srcdir}/sysconfig ! -path "*/\.*/*" ! -name "*~" -type f); do
echo -n "."
- if (LANG=C file ${shfile} | grep -q 'shell script'); then
+ if (LC_ALL=C file ${shfile} | grep -q 'shell script'); then
SHSCRIPTS="${SHSCRIPTS} ${shfile}"
fi
done
Modified: rc-scripts/trunk/rc.d/init.d/cryptsetup
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/cryptsetup (original)
+++ rc-scripts/trunk/rc.d/init.d/cryptsetup Fri Jan 23 14:34:03 2009
@@ -30,15 +30,15 @@
mode=$(ls -l "$key" | cut -c 5-10)
owner=$(ls -l $key | awk '{ print $3 }')
if [ "$mode" != "------" ] && ! key_is_random "$key"; then
- nls "INSECURE MODE FOR %s" "$key"
+ eol fail nls "INSECURE MODE FOR %s" "$key"
ret=1
fi
if [ "$owner" != root ]; then
- nls "INSECURE OWNER FOR %s" "$key"
+ eol fail nls "INSECURE OWNER FOR %s" "$key"
ret=1
fi
else
- nls "Key file for %s not found, skipping" "$dst"
+ eol fail nls "Key file for %s not found, skipping" "$dst"
continue
fi
else
@@ -61,21 +61,21 @@
cipher)
params="$params -c $value"
if [ -z "$value" ]; then
- nls "%s: no value for cipher option, skipping" "$dst"
+ eol fail nls "%s: no value for cipher option, skipping" "$dst"
skip="yes"
fi
;;
size)
params="$params -s $value"
if [ -z "$value" ]; then
- nls "%s: no value for size option, skipping" "$dst"
+ eol fail nls "%s: no value for size option, skipping" "$dst"
skip="yes"
fi
;;
hash)
params="$params -h $value"
if [ -z "$value" ]; then
- nls "%s: no value for hash option, skipping" "$dst"
+ eol fail nls "%s: no value for hash option, skipping" "$dst"
skip="yes"
fi
;;
@@ -103,12 +103,12 @@
if /sbin/cryptsetup isLuks "$src" 2>/dev/null; then
if key_is_random "$key"; then
- nls "%s: LUKS requires non-random key, skipping" "$dst"
+ eol fail nls "%s: LUKS requires non-random key, skipping" "$dst"
ret=1
continue
fi
if [ -n "$params" ]; then
- nls "%s: options are invalid for LUKS partitions, ignoring them" "$dst"
+ eol fail nls "%s: options are invalid for LUKS partitions, ignoring them" "$dst"
fi
/sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1
else
@@ -141,7 +141,7 @@
while read dst src key; do
[ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue
if [ -b "/dev/mapper/$dst" ]; then
- if /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then
+ if LC_ALL=C /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then
/sbin/cryptsetup remove "$dst"
else
fnval=1
Modified: rc-scripts/trunk/sysconfig/network-scripts/functions.network
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/functions.network (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/functions.network Fri Jan 23 14:34:03 2009
@@ -116,7 +116,7 @@
/sbin/ip rule add from $src nat $dst
done
elif [ "$1" = "off" ]; then
- /sbin/ip route show table all | egrep "^nat[[:blank:]]" | while read nat dst via src args; do
+ LC_ALL=C /sbin/ip route show table all | egrep "^nat[[:blank:]]" | while read nat dst via src args; do
/sbin/ip rule del from $src nat $dst
/sbin/ip route del nat $dst via $src
done
@@ -450,7 +450,7 @@
/sbin/ip rule add $args
done
elif is_no "$1"; then
- /sbin/ip rule show | egrep -v -e "from all lookup (main|default|local) \$" -e " map-to " | while read prio from src args; do
+ LC_ALL=C /sbin/ip rule show | egrep -v -e "from all lookup (main|default|local) \$" -e " map-to " | while read prio from src args; do
[ "$src" == "all" ] && ip rule delete $args || ip rule delete $from $src $args
done
fi
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifdown
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifdown (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifdown Fri Jan 23 14:34:03 2009
@@ -110,7 +110,7 @@
if [ -n "${SUBDEVICE}" ]; then
ip addr del ${IP4ADDR} label ${SUBDEVICE} dev ${DEVICE}
else
- ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
+ LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
if [ ${DEVICETYPE} = "bond" ]; then
if [ ! -x /sbin/ifenslave ]; then
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifdown-br
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifdown-br (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifdown-br Fri Jan 23 14:34:03 2009
@@ -42,7 +42,7 @@
# set device down and forget all addresses
for device in ${BRIDGE_DEVS}; do
- ip addr flush dev ${device} 2>&1 | grep -v "Nothing to flush"
+ LC_ALL=C ip addr flush dev ${device} 2>&1 | grep -v "Nothing to flush"
ip link set ${device} down
brctl delif ${DEVICE} ${device}
done
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifdown-vlan
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifdown-vlan (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifdown-vlan Fri Jan 23 14:34:03 2009
@@ -37,11 +37,8 @@
setup_ip_param
ip link set ${DEVICE} down
-ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
+LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
ip link del ${DEVICE}
RESULT=$?
exit $RESULT
-
-# This must be last line !
-# vi:syntax=sh
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-aliases Fri Jan 23 14:34:03 2009
@@ -65,7 +65,7 @@
fi
fi
# Check for IPv6 address
- if (echo $IP_ADDR | grep -q ":"); then
+ if echo $IP_ADDR | grep -q ":"; then
if is_yes "${IPV6_NETWORKING}"; then
ip -6 addr add ${IP_ADDR} dev ${DEVICE} ${IP_ADDR_OPT}
fi
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-br
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-br (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-br Fri Jan 23 14:34:03 2009
@@ -46,7 +46,7 @@
# set device down and forget all addresses
for device in $BRIDGE_DEVS; do
ip link set ${device} down
- ip addr flush dev ${device} 2>&1 | grep -v "Nothing to flush"
+ LC_ALL=C ip addr flush dev ${device} 2>&1 | grep -v "Nothing to flush"
done
# set wireless parameters
Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup-vlan Fri Jan 23 14:34:03 2009
@@ -61,7 +61,7 @@
# set all major variables
setup_ip_param
-if (ip link add type vlan help 2>&1 | grep -q "VLANID :="); then
+if (LC_ALL=C ip link add type vlan help 2>&1 | grep -q "VLANID :="); then
/sbin/ip link set ${VLAN_DEV} up
/sbin/ip link add link ${VLAN_DEV} name ${DEVICE} type vlan id ${VLAN_ID}
# default yes
Modified: rc-scripts/trunk/sysconfig/network-scripts/tnldown
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/tnldown (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/tnldown Fri Jan 23 14:34:03 2009
@@ -31,7 +31,7 @@
exit 1
}
-TNLCONFIGS=$(ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | egrep -v '~$')
+TNLCONFIGS=$(LC_ALL=C ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | egrep -v '~$')
TNLCONFIGS=$(egrep -L '^#!' $TNLCONFIGS)
CONFIG=$(egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
Modified: rc-scripts/trunk/sysconfig/network-scripts/tnlup
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/tnlup (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/tnlup Fri Jan 23 14:34:03 2009
@@ -31,7 +31,7 @@
exit 1
}
-TNLCONFIGS=$(ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | egrep -v '~$')
+TNLCONFIGS=$(LC_ALL=C ls /etc/sysconfig/interfaces/tnlcfg-* 2>/dev/null | egrep -v '~$')
TNLCONFIGS=$(egrep -L '^#!' $TNLCONFIGS)
CONFIG=$(egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
More information about the pld-cvs-commit
mailing list