serverstarter TIMESPENT error

Bug #723289 reported by dlh on 2011-02-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Armagetron Advanced

Bug Description

Full error message:

/usr/local/share/games/armagetronad-dedicated/scripts/serverstarter: line 31: [: TIMESPENT: integer expression expected

I noticed that masterstarter and serverstarter are basically the same, but there are some minor differences. I think one difference is the cause of this error message. serverstarter omits this line which is present in masterstarter:

    declare -a STARTDATE_LOG

Other (basically style)-differences:

* Usage of pushd/popd vs. cd
* test vs [ ]

Luke-Jr (luke-jr) wrote :

This is caused by bzr-etrunk-revno 477, by z-man... and is totally wrong:

- if ! test -z "$OLDESTSTART"; then
- if test ${TIMESPENT} -lt 60; then
+ if [ ! -z "$OLDESTSTART" ]; then
+ if [ TIMESPENT -lt 60 ]; then

Not sure why this changed at all, but it's not valid sh. It should be:

+ if ! [ -z "$OLDESTSTART" ]; then
+ if [ "$TIMESPENT" -lt "60" ]; then

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers