mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
cleanup: let conversion to including devid and change in devid happen at different rates
This commit is contained in:
parent
5d49b9b5d6
commit
9169659c80
1 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue