aboutsummaryrefslogtreecommitdiff
path: root/firma
diff options
context:
space:
mode:
authorluis <luis>2007-01-31 03:04:46 +0000
committerluis <luis>2007-01-31 03:04:46 +0000
commit037dcb2c4fcf6211c0ae5ed6d5b851a6746264d0 (patch)
tree3b7ef5189da8ba54aacba41c9b1ff9d073bdffa5 /firma
parent5686bd1746f7c82a827bde3360111940a1312bca (diff)
downloadfirma-037dcb2c4fcf6211c0ae5ed6d5b851a6746264d0.tar.gz
firma-037dcb2c4fcf6211c0ae5ed6d5b851a6746264d0.tar.bz2
Removed a few dependencies (bc, cat, tac).
Diffstat (limited to 'firma')
-rwxr-xr-xfirma9
1 files changed, 5 insertions, 4 deletions
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