From abbff789ae244412df43f14c5542eca8b6a8fc8d Mon Sep 17 00:00:00 2001 From: Dan HorĂ¡k Date: Wed, 5 May 2010 10:08:18 +0200 Subject: switch from tr to sed use sed for lowercase (and comma to space) substitutions because it lives in /bin while tr lives in /usr/bin and thus requires /usr to be mounted --- dasdconf.sh | 2 +- device_cio_free | 4 ++-- zfcpconf.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dasdconf.sh b/dasdconf.sh index bfb6af3..2be5276 100644 --- a/dasdconf.sh +++ b/dasdconf.sh @@ -27,7 +27,7 @@ if [ -f "$CONFIG" ]; then #warn "No dasd-eckd or dasd-eckd loaded" exit 0 fi - tr "A-Z" "a-z" < $CONFIG | while read line; do + sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do case $line in \#*) ;; *) diff --git a/device_cio_free b/device_cio_free index 381c0a0..80e9451 100644 --- a/device_cio_free +++ b/device_cio_free @@ -49,7 +49,7 @@ free_device() [ -z "$1" ] && return - DEV_LIST=$(echo "$1" | tr "A-Z" "a-z" | sed 's/,/ /g') + DEV_LIST=$(echo "$1" | sed 'y/ABCDEF/abcdef/' | sed 's/,/ /g') for DEV in $DEV_LIST; do [ $VERBOSE ] && echo "Freeing device(s) $DEV" @@ -245,7 +245,7 @@ if [ $MODE_DASD ]; then sed -e 's/.*[[:space:]]dasd=\([^[:space:]]*\).*/\1/' -e 's/([^)]*)//g' \ -e 's/nopav\|nofcx\|autodetect\|probeonly//g' -e 's/,,/,/g' -e 's/^,//' -e 's/,$//') - for DEVRANGE in $(echo $DEVICES | tr ',' ' '); do + for DEVRANGE in $(echo $DEVICES | sed 's/,/ /g'); do free_device $DEVRANGE done fi diff --git a/zfcpconf.sh b/zfcpconf.sh index 4e7dc78..ff8506f 100644 --- a/zfcpconf.sh +++ b/zfcpconf.sh @@ -28,7 +28,7 @@ if [ -f "$CONFIG" ]; then if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then return fi - tr "A-Z" "a-z" < $CONFIG| while read line; do + sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do case $line in \#*) ;; *) -- cgit