Selaa lähdekoodia

Don't copy key fragment to drive if it already contains a full keyring

Bob Mottram 9 vuotta sitten
vanhempi
commit
fc45a596a6
1 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 9
    0
      src/freedombone-keydrive

+ 9
- 0
src/freedombone-keydrive Näytä tiedosto

127
   exit 0
127
   exit 0
128
 fi
128
 fi
129
 
129
 
130
+# Don't use the USB drive if it already contains a full keyring
131
+if [ -d $USB_MOUNT/.gnupg ]; then
132
+  echo 'A full GPG keyring already exists on the USB drive.'
133
+  echo 'Either reformat the USB drive or use a different drive.'
134
+  umount -f $USB_MOUNT
135
+  rm -rf $USB_MOUNT
136
+  exit 3392
137
+fi
138
+
130
 # Append the username as a subdirectory.
139
 # Append the username as a subdirectory.
131
 # This has a down side in that it does identify a given fragment
140
 # This has a down side in that it does identify a given fragment
132
 # as belonging to a given user, but has the convenience upside
141
 # as belonging to a given user, but has the convenience upside