From 9169659c8098e343372647cd042ca36aed31dd01 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 17 Sep 2013 19:11:47 -0700 Subject: [PATCH] cleanup: let conversion to including devid and change in devid happen at different rates --- xwords4/linux/scripts/discon_ok2.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xwords4/linux/scripts/discon_ok2.sh b/xwords4/linux/scripts/discon_ok2.sh index b9439bef6..4f598ec50 100755 --- a/xwords4/linux/scripts/discon_ok2.sh +++ b/xwords4/linux/scripts/discon_ok2.sh @@ -433,15 +433,18 @@ update_ldevid() { KEY=$1 HELP="$(${APPS[$KEY]} --help 2>&1 || /bin/true)" if echo $HELP | grep -q '\-\-ldevid'; then - if [ $((RANDOM % 100)) -lt 33 ]; then - CMD="${ARGS_DEVID[$KEY]}" - if [ -z "$CMD" ]; then # upgrade or first run + RNUM=$((RANDOM % 100)) + CMD="${ARGS_DEVID[$KEY]}" + if [ -z "$CMD" ]; then + if [ $RNUM -lt 30 ]; then # upgrade or first run CMD="--ldevid LINUX_TEST_$(printf %.5d ${KEY})_" - else - CMD="${CMD}x" # give it a new local ID fi - ARGS_DEVID[$KEY]="$CMD" + else + if [ $RNUM -lt 10 ]; then + CMD="${CMD}x" # give it a new local ID + fi fi + ARGS_DEVID[$KEY]="$CMD" fi }