Imported Upstream version 2.6.1p2
[debian/amanda] / changer-src / chg-lib.sh.in
index 9c6632030fe2429d3a708406efc8774d63b7eeac..6a83095028865f58b16439b1bac56f0d88c5a0f0 100644 (file)
@@ -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