瀏覽代碼

Don't need subtraction

Bob Mottram 9 年之前
父節點
當前提交
1604af36b8
共有 3 個檔案被更改,包括 0 行新增3 行删除
  1. 0
    1
      src/freedombone
  2. 0
    1
      src/freedombone-config
  3. 0
    1
      src/freedombone-recoverkey

+ 0
- 1
src/freedombone 查看文件

3819
       echo '        if [ $REMOTE_DOMAIN ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3819
       echo '        if [ $REMOTE_DOMAIN ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3820
       echo "            cd /home/$MY_USERNAME/.gnupg_fragments" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3820
       echo "            cd /home/$MY_USERNAME/.gnupg_fragments" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3821
       echo '            no_of_shares=$(ls -afq keyshare.asc.* | wc -l)' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3821
       echo '            no_of_shares=$(ls -afq keyshare.asc.* | wc -l)' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3822
-      echo '            no_of_shares=$((no_of_shares - 2))' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3823
       echo '            if (( no_of_shares > 0 )); then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3822
       echo '            if (( no_of_shares > 0 )); then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3824
       echo '                # Pick a share index based on the domain name' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3823
       echo '                # Pick a share index based on the domain name' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3825
       echo '                # This ensures that the same share is always given to the same domain' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
3824
       echo '                # This ensures that the same share is always given to the same domain' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME

+ 0
- 1
src/freedombone-config 查看文件

279
     fi
279
     fi
280
     cd /home/$MY_USERNAME/.gnupg_fragments
280
     cd /home/$MY_USERNAME/.gnupg_fragments
281
     no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
281
     no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
282
-    no_of_shares=$((no_of_shares - 2))
283
     if (( no_of_shares < 4 )); then
282
     if (( no_of_shares < 4 )); then
284
         dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
283
         dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
285
         exit 7348
284
         exit 7348

+ 0
- 1
src/freedombone-recoverkey 查看文件

128
 # was anything downloaded?
128
 # was anything downloaded?
129
 cd $FRAGMENTS_DIR
129
 cd $FRAGMENTS_DIR
130
 no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
130
 no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
131
-no_of_shares=$((no_of_shares - 2))
132
 if (( no_of_shares == 0 )); then
131
 if (( no_of_shares == 0 )); then
133
     echo 'No key fragments were retrieved'
132
     echo 'No key fragments were retrieved'
134
     exit 76882
133
     exit 76882