diff options
author | luis <luis> | 2007-01-31 03:04:46 +0000 |
---|---|---|
committer | luis <luis> | 2007-01-31 03:04:46 +0000 |
commit | 037dcb2c4fcf6211c0ae5ed6d5b851a6746264d0 (patch) | |
tree | 3b7ef5189da8ba54aacba41c9b1ff9d073bdffa5 | |
parent | 5686bd1746f7c82a827bde3360111940a1312bca (diff) | |
download | firma-037dcb2c4fcf6211c0ae5ed6d5b851a6746264d0.tar.gz firma-037dcb2c4fcf6211c0ae5ed6d5b851a6746264d0.tar.bz2 |
Removed a few dependencies (bc, cat, tac).
-rwxr-xr-x | GUIDELINES | 29 | ||||
-rwxr-xr-x | firma | 9 |
2 files changed, 21 insertions, 17 deletions
@@ -38,22 +38,25 @@ In the future this procedure will be automatic. $GPG_BINARY $MAIL_AGENT - echo - cat - grep - wc - tr - seq - cut - sed - mkdir - touch + basename chmod chown - basename + cut + echo expect fold - uniq - tac + grep + head + logger + mkdir + mv + rm + sed sha1sum + sleep + sort + touch + tr + uniq + wc @@ -1350,7 +1350,7 @@ EOF fi if [[ "$return_code" == "0" || "$?" == "0" ]]; then - AdminLog "use: $1 chosen for message delivery. $(echo $uid_count -1 | bc -l) UID(s) deleted from public key ${keyid:32}." + AdminLog "use: $1 chosen for message delivery. $(($uid_count - 1)) UID(s) deleted from public key ${keyid:32}." else return_code=1 fi @@ -2171,6 +2171,7 @@ function SetDeliveryRandomization { fi } + function DeliveryRandomization { #------------------------------------------------------------- # sleep according $DELIVERY_RANDOMIZATION @@ -2202,7 +2203,7 @@ function ReplayProtectionFlush { if [[ "$REPLAY_PROTECTION" == "yes" ]]; then if [[ -f "$REPLAY_FILE" ]]; then if [[ "$(wc -l $REPLAY_FILE | cut -d " " -f 1)" -gt "$REPLAY_COUNT" ]]; then - tac $REPLAY_FILE | head -n $REPLAY_COUNT | tac > $REPLAY_FILE + sed -ie '1d' $REPLAY_FILE fi else touch $REPLAY_FILE @@ -2235,8 +2236,8 @@ function ReplayProtectionCheck { touch $REPLAY_FILE.tmp chown $FIRMA_USER.$FIRMA_GROUP $REPLAY_FILE.tmp chmod 600 $REPLAY_FILE.tmp - cat $REPLAY_FILE | sed -e "/^$sha1$/d" > $REPLAY_FILE.tmp - mv $REPLAY_FILE.tmp $REPLAY_FILE + sed -e "/^$sha1$/d" $REPLAY_FILE > $REPLAY_FILE.tmp + mv -f $REPLAY_FILE.tmp $REPLAY_FILE return 1 else return 0 |