From 037dcb2c4fcf6211c0ae5ed6d5b851a6746264d0 Mon Sep 17 00:00:00 2001 From: luis Date: Wed, 31 Jan 2007 03:04:46 +0000 Subject: Removed a few dependencies (bc, cat, tac). --- firma | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'firma') diff --git a/firma b/firma index 36ce02a..7efa205 100755 --- a/firma +++ b/firma @@ -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 -- cgit v1.2.3