]> git.sur5r.net Git - bacula/rescue/blobdiff - rescue/linux/usb/write_usb_boot_partition
Update doc
[bacula/rescue] / rescue / linux / usb / write_usb_boot_partition
index be4c45f40b28cd6463e97d8c070edf2eb03c7742..a7164691e688f42386843f35a5e7dbc5e8217d83 100755 (executable)
@@ -19,6 +19,10 @@ umount ${USB_DEV}1 2>/dev/null 1>/dev/null
 
 echo "Reformat USB boot partition"
 mkfs.vfat -F 16 -n kubuntu8 ${USB_DEV}1
+if [ ! -d ${MOUNT_POINT}/kubuntu8 ] ; then
+   mkdir -p ${MOUNT_POINT}/kubuntu8
+   created="yes"
+fi
 mount ${USB_DEV}1 ${MOUNT_POINT}/kubuntu8
 if [ $? -ne 0 ] ; then
   echo "Mount of USB boot partition failed."
@@ -40,3 +44,6 @@ echo "syncing ..."
 sync
 sync
 umount ${MOUNT_POINT}/kubuntu8
+if [ "x$created" = "xyes" ] ; then
+   rmdir ${MOUNT_POINT}/kubuntu8
+fi