Force unmount

This commit is contained in:
Bob Mottram 2015-07-04 17:25:41 +01:00
parent 4bbfd4536b
commit 09462456b3
1 changed files with 3 additions and 3 deletions

View File

@ -374,14 +374,14 @@ function interactive_gpg_from_usb {
if [ ! -d $GPG_USB_MOUNT/.gnupg ]; then if [ ! -d $GPG_USB_MOUNT/.gnupg ]; then
if [ ! -d $GPG_USB_MOUNT/.gnupg_fragments ]; then if [ ! -d $GPG_USB_MOUNT/.gnupg_fragments ]; then
if [[ ${GPG_CTR} > 0 ]]; then if [[ ${GPG_CTR} > 0 ]]; then
umount $GPG_USB_MOUNT umount -f $GPG_USB_MOUNT
rm -rf $GPG_USB_MOUNT rm -rf $GPG_USB_MOUNT
reconstruct_key reconstruct_key
return 0 return 0
fi fi
dialog --title "Encryption keys" \ dialog --title "Encryption keys" \
--msgbox "The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70 --msgbox "The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
umount $GPG_USB_MOUNT umount -f $GPG_USB_MOUNT
rm -rf $GPG_USB_MOUNT rm -rf $GPG_USB_MOUNT
exit 723814 exit 723814
fi fi
@ -398,7 +398,7 @@ function interactive_gpg_from_usb {
cp $GPG_USB_MOUNT/.ssh/* /home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')/.ssh cp $GPG_USB_MOUNT/.ssh/* /home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')/.ssh
fi fi
umount $GPG_USB_MOUNT umount -f $GPG_USB_MOUNT
rm -rf $GPG_USB_MOUNT rm -rf $GPG_USB_MOUNT
if [[ $GPG_LOADING == "yes" ]]; then if [[ $GPG_LOADING == "yes" ]]; then
dialog --title "Encryption keys" \ dialog --title "Encryption keys" \