diff options
author | Jesse Keating <jkeating@redhat.com> | 2012-05-24 14:23:35 -0700 |
---|---|---|
committer | Dan Horák <dan@danny.cz> | 2012-05-25 09:00:46 +0200 |
commit | 4e33e8fb92757ad6c44e0881a5603099999b7ba6 (patch) | |
tree | 168dfd87a93f28691ee66b5c79efccdb5fbd58d7 | |
parent | cb3858ea5b14a4c140493d12a818546036c9187e (diff) | |
download | utils-4e33e8fb92757ad6c44e0881a5603099999b7ba6.tar.gz utils-4e33e8fb92757ad6c44e0881a5603099999b7ba6.tar.xz utils-4e33e8fb92757ad6c44e0881a5603099999b7ba6.zip |
Make sure errors go to stderr
We pipe the output of this script into a file, so we don't want any
error strings to leak into it.
-rwxr-xr-x | normalize_dasd_arg | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/normalize_dasd_arg b/normalize_dasd_arg index c1bd9cf..3e7afa6 100755 --- a/normalize_dasd_arg +++ b/normalize_dasd_arg @@ -60,7 +60,7 @@ case $? in 0) # string matched the pattern lo=$(canonicalize_devno $lo) ;; 1) # string did not match the pattern - echo $"Incorrect format for lower bound of DASD range $range: $lo" + echo $"Incorrect format for lower bound of DASD range $range: $lo" 1>&2 exit 1 ;; 2) echo "l.$LINENO: syntax error in regex of match operator =~, code needs to be fixed" 1>&2 ;; @@ -73,12 +73,12 @@ case $? in 0) # string matched the pattern hi=$(canonicalize_devno $hi) if [ "${lo%.*}" != "${hi%.*}" ]; then - echo $"Prefixes of DASD range $range do not match: ${lo%.*} != ${hi%.*}" + echo $"Prefixes of DASD range $range do not match: ${lo%.*} != ${hi%.*}" 1>&2 exit 1 fi ;; 1) # string did not match the pattern - echo $"Incorrect format for upper bound of DASD range $range: $hi" + echo $"Incorrect format for upper bound of DASD range $range: $hi" 1>&2 exit 1 ;; 2) echo "l.$LINENO: syntax error in regex of match operator =~, code needs to be fixed" 1>&2 ;; @@ -86,7 +86,7 @@ case $? in esac fi if [ "${features//*)/}" != "" ]; then - echo $"Missing closing parenthesis at features of DASD range $range: ($features" + echo $"Missing closing parenthesis at features of DASD range $range: ($features" 1>&2 exit 1 fi if [ -n "$features" ]; then @@ -97,7 +97,7 @@ case $? in ro) attrs=$attrs" readonly" ;; diag) attrs=$attrs" use_diag" ;; erplog|failfast) attrs=$attrs" "$feature ;; - *) echo $"Unknown DASD feature for device range $range: $feature" + *) echo $"Unknown DASD feature for device range $range: $feature" 1>&2 exit 1 ;; esac |