From 01de99d3ab3170ab6323a6c5ef29081d85e35e62 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 7 May 2006 20:35:11 +0000 Subject: [PATCH 1/1] Bugfix: add a starting 1 to channel calculation. When the base number to calculate the channel started with 0, the number was interpreted as octal and if there any digit bigger than 7 it got a syntax error. This patch adds a digit 1 to the begining of the base channel number to avoid the octal interpretation. --- rotate-key | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rotate-key b/rotate-key index e834ae8..14e20f1 100644 --- a/rotate-key +++ b/rotate-key @@ -59,7 +59,7 @@ key=`echo "$str" | $HASH_PROG | cut -c-$size` # Compute the new channel if [ -n "$ROTATE_CHANNEL" ] then - chan=`echo $key | tr abcdef 847502 | cut -c-6` + chan=1`echo $key | tr abcdef 847502 | cut -c-6` chan=$(($chan % $MAX_CHANNEL + 1)) channel="channel $chan" fi -- 2.43.0