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.
# 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