Don't need subtraction

This commit is contained in:
Bob Mottram 2015-07-05 10:50:14 +01:00
parent c11f5ce894
commit 1604af36b8
3 changed files with 0 additions and 3 deletions

View File

@ -3819,7 +3819,6 @@ function backup_to_friends_servers {
echo ' if [ $REMOTE_DOMAIN ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo " cd /home/$MY_USERNAME/.gnupg_fragments" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' no_of_shares=$(ls -afq keyshare.asc.* | wc -l)' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' no_of_shares=$((no_of_shares - 2))' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if (( no_of_shares > 0 )); then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' # Pick a share index based on the domain name' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' # This ensures that the same share is always given to the same domain' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME

View File

@ -279,7 +279,6 @@ function reconstruct_key {
fi
cd /home/$MY_USERNAME/.gnupg_fragments
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
no_of_shares=$((no_of_shares - 2))
if (( no_of_shares < 4 )); then
dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
exit 7348

View File

@ -128,7 +128,6 @@ fi
# was anything downloaded?
cd $FRAGMENTS_DIR
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
no_of_shares=$((no_of_shares - 2))
if (( no_of_shares == 0 )); then
echo 'No key fragments were retrieved'
exit 76882