X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=changer-src%2Fchg-lib.sh.in;h=6a83095028865f58b16439b1bac56f0d88c5a0f0;hb=96f35b20267e8b1a1c846d476f27fcd330e0b018;hp=9c6632030fe2429d3a708406efc8774d63b7eeac;hpb=d74dc4d908fcbc1a4ef474edaf51e61ec90eab6b;p=debian%2Famanda diff --git a/changer-src/chg-lib.sh.in b/changer-src/chg-lib.sh.in index 9c66320..6a83095 100644 --- a/changer-src/chg-lib.sh.in +++ b/changer-src/chg-lib.sh.in @@ -110,7 +110,7 @@ amdevcheck_status() { test "$amdevcheck_status" -ne 0 && return 0 # extract any messages - amdevcheck_message=`echo "$amdevcheck_output" | sed '/^MESSAGE /{s/^MESSAGE //;p;}; d'` + amdevcheck_message=`echo "$amdevcheck_output" | sed -n -e '/^MESSAGE /{' -e 's/^MESSAGE //' -e 'p' -e 'q' -e '}'` # Return 1 if it's possible that the device is offline or busy; if the device cannot # distinguish this state from an error condition, then our caller will just have to