X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fbuildd-add-keys;h=0a2fc06cda9ecf6134dc80834944d332bb59f291;hb=06821d29e8c4e4a259f76777232c3c62339afdf8;hp=26fc1f3f3e6c65edf0db2ac28d7fe92de0abc0e5;hpb=80cfee07dd22dc9190eb05237db26a8e1514e1c6;p=dak.git diff --git a/scripts/debian/buildd-add-keys b/scripts/debian/buildd-add-keys index 26fc1f3f..0a2fc06c 100755 --- a/scripts/debian/buildd-add-keys +++ b/scripts/debian/buildd-add-keys @@ -43,8 +43,7 @@ function cleanup() { trap - ERR EXIT TERM HUP INT QUIT for TEMPFILE in GPGSTATUS GPGLOGS GPGOUTF TEMPKEYDATA; do - TFILE=${TEMPFILE:=$TEMPFILE} - DELF=${!TFILE:-""} + DELF=${!TEMPFILE:-""} if [ -n "${DELF}" ] && [ -f "${DELF}" ]; then rm -f "${DELF}" fi @@ -239,11 +238,11 @@ for file in ${KEYS}; do continue fi - # We want a maximum lifetime of 120 days, so check that. - # Easiest to compare in epoch, so lets see, 120 days midnight from now, + # We want a maximum lifetime of 365 days, so check that. + # Easiest to compare in epoch, so lets see, 365 days midnight from now, # compared with their set expiration date at midnight - # maxdate should turn out higher. just in case we make it 121 for this check - maxdate=$(date -d '121 day 00:00:00' +%s) + # maxdate should turn out higher. just in case we make it 366 for this check + maxdate=$(date -d '366 day 00:00:00' +%s) theirexpire=$(date -d "${KEYEXPIRE} 00:00:00" +%s) if [ ${theirexpire} -gt ${maxdate} ]; then log "Key expiry ${KEYEXPIRE} wrong"