From 9680e986d773e932081ef3e1ae2a623b82bea3aa Mon Sep 17 00:00:00 2001 From: Austin English Date: Sat, 23 May 2020 02:32:50 -0500 Subject: [PATCH] scripts/InstallScripts/InstallPrawnOS.sh: only attempt to unmount if the device is mounted This reduces unneeded noise to the console. If there is problem, we already ignored anyway, because of `|| /bin/true` --- scripts/InstallScripts/InstallPrawnOS.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/InstallScripts/InstallPrawnOS.sh b/scripts/InstallScripts/InstallPrawnOS.sh index cacdff5..f7d0ea6 100755 --- a/scripts/InstallScripts/InstallPrawnOS.sh +++ b/scripts/InstallScripts/InstallPrawnOS.sh @@ -95,8 +95,17 @@ install() { esac done - umount ${TARGET}1 || /bin/true + # Only try to unmount if the device is mounted + # If it is, try anyway, the dd will (likely) take care of it anyway + if findmnt ${TARGET}1 > /dev/null + then + umount ${TARGET}1 || /bin/true + fi + + if findmnt ${TARGET}2 > /dev/null + then umount ${TARGET}2 || /bin/true + fi if [[ $TARGET == "/dev/mmcblk2p" ]] then