serverstarter TIMESPENT error
Bug #723289 reported by
dlh
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Armagetron Advanced |
New
|
Undecided
|
Unassigned |
Bug Description
Full error message:
/usr/local/
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 [ ]
To post a comment you must log in.
This is caused by bzr-etrunk-revno 477, by z-man... and is totally wrong:
- if ! test -z "$OLDESTSTART"; then $(($STARTDATE - $OLDESTSTART))
- TIMESPENT=
- if test ${TIMESPENT} -lt 60; then
+ if [ ! -z "$OLDESTSTART" ]; then
+ TIMESPENT=`expr ${STARTDATE} - ${OLDESTSTART}`
+ 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
+ TIMESPENT=`expr ${STARTDATE} - ${OLDESTSTART}`
+ if [ "$TIMESPENT" -lt "60" ]; then