ソースを参照

Just check for gnupg directory

Bob Mottram 8 年 前
コミット
30dd79a83c
共有3 個のファイルを変更した1 個の追加7 個の削除を含む
  1. 1
    5
      src/freedombone-base-email
  2. 0
    1
      src/freedombone-utils-keys
  3. 0
    1
      src/freedombone-utils-setup

+ 1
- 5
src/freedombone-base-email ファイルの表示

@@ -48,9 +48,6 @@ GPG_KEYSERVER="hkp://keys.gnupg.net"
48 48
 # whether to encrypt all incoming email with your public key
49 49
 GPG_ENCRYPT_STORED_EMAIL="yes"
50 50
 
51
-# gets set to yes if gpg keys are imported from usb
52
-GPG_KEYS_IMPORTED="no"
53
-
54 51
 # optionally you can provide your exported GPG key pair here
55 52
 # Note that the private key file will be deleted after use
56 53
 # If these are unspecified then a new GPG key will be created
@@ -1530,13 +1527,12 @@ function configure_gpg {
1530 1527
     gpg_dir=/home/$MY_USERNAME/.gnupg
1531 1528
 
1532 1529
     # if gpg keys directory was previously imported from usb
1533
-    echo $"GPG keys imported: $GPG_KEYS_IMPORTED"
1534 1530
     if [ -d $gpg_dir ]; then
1535 1531
         echo $'GPG directory exists'
1536 1532
     else
1537 1533
         echo $"GPG directory $gpg_dir was not found"
1538 1534
     fi
1539
-    if [[ $GPG_KEYS_IMPORTED == "yes" && -d $gpg_dir ]]; then
1535
+    if [ -d $gpg_dir ]; then
1540 1536
         echo $'GPG keys were imported'
1541 1537
         sed -i "s|keyserver hkp://keys.gnupg.net|keyserver $GPG_KEYSERVER|g" $gpg_dir/gpg.conf
1542 1538
         MY_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$MY_USERNAME" "$MY_EMAIL_ADDRESS")

+ 0
- 1
src/freedombone-utils-keys ファイルの表示

@@ -240,7 +240,6 @@ function interactive_key_recovery {
240 240
     ${PROJECT_NAME}-recoverkey -u $MY_USERNAME
241 241
     if [ -d /home/$MY_USERNAME/.gnupg ]; then
242 242
         cp -rf /home/$MY_USERNAME/.gnupg /root
243
-        GPG_KEYS_IMPORTED='yes'
244 243
     fi
245 244
 }
246 245
 

+ 0
- 1
src/freedombone-utils-setup ファイルの表示

@@ -259,7 +259,6 @@ function search_for_attached_usb_drive {
259 259
             echo $'Importing GPG keyring'
260 260
             cp -r $USB_MOUNT/.gnupg /home/$MY_USERNAME
261 261
             chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg
262
-            GPG_KEYS_IMPORTED="yes"
263 262
             if [ ! -f /home/$MY_USERNAME/.gnupg/secring.gpg ]; then
264 263
                 echo $'GPG files did not copy'
265 264
                 exit 73529