commit a05bdc265bf652fe138018f24127dbf97190c81c
parent 9f7cf3a2510077fca2a6673e5075a61fe50412b2
Author: Jake Bauer <jbauer@paritybit.ca>
Date: Wed, 26 Feb 2020 21:15:14 -0500
Handle unhandled error message
Error message would occur if a device was removed in the middle of an
operation. For example, if a USB stick was being mounted then was yanked
form the computer before the operation finished.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/usrmnt b/usrmnt
@@ -17,7 +17,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -u
-version="1.1.1"
+version="1.1.2"
print_help()
{
@@ -130,6 +130,9 @@ check_output()
elif echo "$1" | grep -qi "Error unmounting"; then
printf "\n ERROR: Cannot unmount the device, device still in use.\n\n"
+ elif echo "$1" | grep -qi "does not exist"; then
+ printf "\n ERROR: Device appears to have been removed mid-operation.\n\n"
+
elif echo "$1" | grep -qi "Error"; then
printf "\n ERROR: Unhandled error: \n\n"
echo "$1"