Don't need subtraction
This commit is contained in:
parent
c11f5ce894
commit
1604af36b8
|
@ -3819,7 +3819,6 @@ function backup_to_friends_servers {
|
||||||
echo ' if [ $REMOTE_DOMAIN ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
|
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 " 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=$(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 ' 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 ' # 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
|
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
|
fi
|
||||||
cd /home/$MY_USERNAME/.gnupg_fragments
|
cd /home/$MY_USERNAME/.gnupg_fragments
|
||||||
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
|
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
|
||||||
no_of_shares=$((no_of_shares - 2))
|
|
||||||
if (( no_of_shares < 4 )); then
|
if (( no_of_shares < 4 )); then
|
||||||
dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
|
dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
|
||||||
exit 7348
|
exit 7348
|
||||||
|
|
|
@ -128,7 +128,6 @@ fi
|
||||||
# was anything downloaded?
|
# was anything downloaded?
|
||||||
cd $FRAGMENTS_DIR
|
cd $FRAGMENTS_DIR
|
||||||
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
|
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
|
||||||
no_of_shares=$((no_of_shares - 2))
|
|
||||||
if (( no_of_shares == 0 )); then
|
if (( no_of_shares == 0 )); then
|
||||||
echo 'No key fragments were retrieved'
|
echo 'No key fragments were retrieved'
|
||||||
exit 76882
|
exit 76882
|
||||||
|
|
Loading…
Reference in New Issue