Bug with makefile that can erase host MBR (6)

This commit is contained in:
Adrien Bourmault 2020-02-05 23:17:13 +01:00
parent 960a3c97c8
commit 66bb849b8c
1 changed files with 9 additions and 1 deletions

View File

@ -64,4 +64,12 @@ echo ${CL2}[install-os-k.sh]${NC} Sync image... \(sync\)${CL3}
sync
echo ${CL2}[install-os-k.sh]${NC} Unmount image... \(udisksctl\)${CL3}
udisksctl unmount --no-user-interaction -b $lpblock
udisksctl unmount --no-user-interaction -b $lpblock
lpblock=$(/sbin/losetup -j $1 | cut -d ':' -f 1)
if [ -z $lpblock ];
then
return 0
fi
udisksctl loop-delete -b $lpblock