diff --git a/src/freedombone-keydrive b/src/freedombone-keydrive index b75a2950..7f94983f 100755 --- a/src/freedombone-keydrive +++ b/src/freedombone-keydrive @@ -132,6 +132,7 @@ FRAGMENTS_DIR=$FRAGMENTS_DIR/$MY_USERNAME # make a directory to contain the fragments if [ ! -d $FRAGMENTS_DIR ]; then mkdir -p $FRAGMENTS_DIR + echo "Made directory $FRAGMENTS_DIR" fi if [ ! -d $FRAGMENTS_DIR ]; then echo "There was a problem making the directory $FRAGMENTS_DIR" @@ -170,7 +171,7 @@ else fi if (( no_of_local_shares < 3 )); then freedombone-splitkey -u $MY_USERNAME - cd $LOCAL_FRAGMENTS_DIR + cd $LOCAL_FRAGMENTS_DIR no_of_local_shares=$(ls -afq keyshare.asc.* | wc -l) if [ ! "$?" = "0" ]; then no_of_local_shares=0 @@ -196,6 +197,7 @@ no_of_usb_shares=$((no_of_usb_shares - 2)) if (( no_of_usb_shares > 1 )); then echo "Too many key fragments exist in $FRAGMENTS_DIR" ls $FRAGMENTS_DIR + cd ~/ umount -f $USB_MOUNT rm -rf $USB_MOUNT exit 54292 @@ -203,10 +205,12 @@ fi if (( no_of_usb_shares <= 0 )); then echo "There was a problem copying the key fragment to $USB_DRIVE" ls $FRAGMENTS_DIR + cd ~/ umount -f $USB_MOUNT rm -rf $USB_MOUNT exit 54292 fi +cd ~/ umount -f $USB_MOUNT rm -rf $USB_MOUNT echo "Key fragment copied to $USB_DRIVE. You may now remove the drive."