diff options
Diffstat (limited to 'scripts/contrib/mkefidisk.sh')
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 13 |
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 | # |
103 | grep -q $DEVICE /proc/mounts | 103 | grep -q $DEVICE /proc/mounts |
104 | if [ $? -eq 0 ]; then | 104 | if [ $? -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" | ||
109 | fi | 113 | fi |
110 | 114 | ||
111 | 115 | ||
@@ -153,6 +157,7 @@ echo "Boot partition size: $BOOT_SIZE MB ($BOOTFS)" | |||
153 | echo "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)" | 157 | echo "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)" |
154 | echo "Swap partition size: $SWAP_SIZE MB ($SWAP)" | 158 | echo "Swap partition size: $SWAP_SIZE MB ($SWAP)" |
155 | echo "*****************" | 159 | echo "*****************" |
160 | |||
156 | echo "Deleting partition table on $DEVICE ..." | 161 | echo "Deleting partition table on $DEVICE ..." |
157 | dd if=/dev/zero of=$DEVICE bs=512 count=2 | 162 | dd if=/dev/zero of=$DEVICE bs=512 count=2 |
158 | 163 | ||