Skip to content
Snippets Groups Projects
Commit 1604af36 authored by Bob Mottram's avatar Bob Mottram
Browse files

Don't need subtraction

parent c11f5ce8
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment