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`
This commit is contained in:
Austin English 2020-05-23 02:32:50 -05:00
parent 9d5dbaf846
commit 9680e986d7

View File

@ -95,8 +95,17 @@ install() {
esac
done
# 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