diff options
author | Dan Horák <dan@danny.cz> | 2010-06-28 15:25:34 +0200 |
---|---|---|
committer | Dan Horák <dan@danny.cz> | 2010-06-28 15:25:34 +0200 |
commit | aa072f3615170a058ecee498f2d5223429e8f7fc (patch) | |
tree | e8d27e74a06c4375a4a41e8d86abd32fc7c06b05 | |
parent | 5dec421fba9dce1e0d82887efa3ddbd7352aac96 (diff) | |
download | utils-aa072f3615170a058ecee498f2d5223429e8f7fc.tar.gz utils-aa072f3615170a058ecee498f2d5223429e8f7fc.tar.xz utils-aa072f3615170a058ecee498f2d5223429e8f7fc.zip |
run grep in a defined locale
grep should be run with a predefined locale to get reproducable results
-rw-r--r-- | device_cio_free | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/device_cio_free b/device_cio_free index 9474ba3..84e7468 100644 --- a/device_cio_free +++ b/device_cio_free @@ -257,7 +257,7 @@ fi if [ $MODE_DASD ]; then # process the device list defined as option for the dasd module - DEVICES=$(modprobe --showconfig | grep "options[[:space:]]\+dasd_mod" | \ + DEVICES=$(modprobe --showconfig | LANG=C grep "options[[:space:]]\+dasd_mod" | \ sed -e 's/.*[[:space:]]dasd=\([^[:space:]]*\).*/\1/' -e 's/([^)]*)//g' \ -e 's/nopav\|nofcx\|autodetect\|probeonly//g' -e 's/,,/,/g' -e 's/^,//' -e 's/,$//') @@ -275,7 +275,7 @@ if [ $MODE_ZNET ]; then *) [ -z "$line" ] && continue # grep 2 or 3 channels from each "<nettype>,<subchannels>,<options>" line - DEVICES=$(echo $line | grep -E -i -o "([0-9]\.[0-9]\.[a-f0-9]+,){1,2}([0-9]\.[0-9]\.[a-f0-9]+)") + DEVICES=$(echo $line | LANG=C grep -E -i -o "([0-9]\.[0-9]\.[a-f0-9]+,){1,2}([0-9]\.[0-9]\.[a-f0-9]+)") free_device $DEVICES ;; esac @@ -290,7 +290,7 @@ if [ $MODE_ZNET ]; then __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d' fi fi - for line in $(grep -E -i -h \ + for line in $(LANG=C grep -E -i -h \ "^[[:space:]]*SUBCHANNELS=['\"]?([0-9]\.[0-9]\.[a-f0-9]+,){1,2}([0-9]\.[0-9]\.[a-f0-9]+)['\"]?([[:space:]]+#|[[:space:]]*$)" \ $(ls /etc/sysconfig/network-scripts/ifcfg-* | LC_ALL=C sed -e "$__sed_discard_ignored_files") 2> /dev/null) do |