summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/mkefidisk.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index acadd49774..741c3ab967 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -102,10 +102,14 @@ fi
102# 102#
103grep -q $DEVICE /proc/mounts 103grep -q $DEVICE /proc/mounts
104if [ $? -eq 0 ]; then 104if [ $? -eq 0 ]; then
105 echo "ERROR: $DEVICE partitions mounted:" 105 echo -n "$DEVICE listed in /proc/mounts, attempting to unmount..."
106 grep $DEVICE /proc/mounts | cut -f 1 -d " " 106 umount $DEVICE* 2>/dev/null
107 echo "Unmount the partitions listed and try again." 107 grep -q $DEVICE /proc/mounts
108 exit 1 108 if [ $? -eq 0 ]; then
109 echo "FAILED"
110 exit 1
111 fi
112 echo "OK"
109fi 113fi
110 114
111 115
@@ -153,6 +157,7 @@ echo "Boot partition size: $BOOT_SIZE MB ($BOOTFS)"
153echo "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)" 157echo "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)"
154echo "Swap partition size: $SWAP_SIZE MB ($SWAP)" 158echo "Swap partition size: $SWAP_SIZE MB ($SWAP)"
155echo "*****************" 159echo "*****************"
160
156echo "Deleting partition table on $DEVICE ..." 161echo "Deleting partition table on $DEVICE ..."
157dd if=/dev/zero of=$DEVICE bs=512 count=2 162dd if=/dev/zero of=$DEVICE bs=512 count=2
158 163