From 692f093d219110a8cf8b5b9813b948442a6a719f Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Thu, 16 Jan 2014 22:42:02 +0100 Subject: [PATCH] alfred: clean up delay code --- package/gluon-alfred/files/lib/gluon/alfred/announce.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.sh b/package/gluon-alfred/files/lib/gluon/alfred/announce.sh index 928cee8f..c24c1b23 100755 --- a/package/gluon-alfred/files/lib/gluon/alfred/announce.sh +++ b/package/gluon-alfred/files/lib/gluon/alfred/announce.sh @@ -15,7 +15,7 @@ fi # set defaults [ -z "$ALFRED_DATA_TYPE" ] && ALFRED_DATA_TYPE=158 [ -z "$NET_IF" ] && NET_IF=br-client -[ -z "$MAX_WAIT" ] && MAX_WAIT=300 +[ -z "$MAX_WAIT" ] && MAX_WAIT=299 set -e @@ -23,7 +23,7 @@ set -e # simultaneously, wait for a random time between 0 and 300 seconds, but fixed # for each device to maintain 5 minutes between updates. # Calculated using first 3 hex digits of the primary MAC address' MD5 hash -DELAY=$((0x$(sysconfig primary_mac | tr -d ':' | md5sum | head -c3) * $MAX_WAIT / (16**3))) +DELAY=$((0x$(sysconfig primary_mac | md5sum | head -c3) * $MAX_WAIT / (16**3))) sleep $DELAY json_init