Article View: news.software.nntp
Article #29201Re: INN 2.0 innwatch script buggy?
From: Andreas Muck
Date: Thu, 18 Jun 1998 00:00
Date: Thu, 18 Jun 1998 00:00
76 lines
3238 bytes
3238 bytes
dws@engr.uark.edu (David W. Summers) writes:
>I'm compiling INN 2.0 on Linux and when the innwatch script starts
>it says:
>innwatch: [: integer expression expected before -lt
I sent this email to inn-bugs last week, but didn't get any
feedback.
Date: Fri, 12 Jun 1998 12:22:28 +0200 (MEST)
From: Andreas Muck <andi@koala.rhein-neckar.de>
To: inn-bugs@isc.org
Subject: innwatch bug
Hello,
this is inn-1998-06-10_04-03 running on Linux 2.1.105 with bash version
2.01.1(1)-release. Storage method is cnfs. Running innwatch gives
periodically this error (or warning?):
/usr/local/news/bin/innwatch: [: : integer expression expected
/usr/local/news/bin/innwatch: [: : integer expression expected
I used "set -x" and tracked it down to this:
+ PREVEXP=/bin/df -i . | awk 'NR == 2 { print $7 }'
++ trap '' 2
++ eval '/bin/df -i . | awk '\''NR == 2 { print $7 }'\'''
+++ /bin/df -i .
+++ awk 'NR == 2 { print $7 }'
+ VALUE=
+ OK=n
+ '[' '(' -z '' -o '' '!=' 37 -o n = y ')' -a '' -lt 200 ']'
########################################## ^ here it is
/usr/local/news/bin/innwatch: [: : integer expression expected
+ '[' '' = 37 -a '(' throttle = throttle -o throttle = pause ')' -a '!' '' -lt 200 ']'
######################################### and here ^
/usr/local/news/bin/innwatch: [: : integer expression expected
+ read line
++ expr 37 + 1
+ LINE=38
This seems to be caused by the line 230:
if [ \( -z "${STATE}" -o "${STATE}" != "${LAB}" -o "${OK}" = y \) \
-a "${VALUE}" "-${TST}" "${LIM}" ] ; then
and 278:
elif [ "${STATE}" = "${LAB}" -a \
\( "${CMD}" = "throttle" -o "${CMD}" = pause \) -a \
! "${VALUE}" "-${TST}" "${LIM}" ] ; then
$VALUE seems to be set by `eval $EXP` which gives
`/bin/df -i . | awk 'NR == 2 { print $7 }'`
But the df output has only 6 fields:
Filesystem Inodes IUsed IFree %IUsed Mounted on
/dev/sdb1 104040 30146 73894 29% /var
so $VALUE remains empty. That's about all I could figure out :-)
I disabled innwatch because I don't need it anyway (single client serving
inn :-) but I wanted to let you know anyway.
Andi
--
Breslauer Str. 51 69124 Heidelberg Germany
Voice: +49 6221 780235 Data/Fax: +49 6221 783543
Rhein-Neckar Internet http://www.rhein-neckar.de/
Technical Details
Message-ID:
<m3wwafbku9.fsf@koala.rhein-neckar.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<6m8vpv$b9a@admin1.engr.uark.edu>Show Full Headers
Complete Article Headers
Message-ID: <m3wwafbku9.fsf@koala.rhein-neckar.de> Subject: Re: INN 2.0 innwatch script buggy? Date: Thu, 18 Jun 1998 00:00:00 +0000 From: Andreas Muck <andi@koala.rhein-neckar.de> References: <6m8vpv$b9a@admin1.engr.uark.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 363717523 Mime-Version: 1.0 (generated by tm-edit 7.106) NNTP-Posting-Date: 18 Jun 1998 00:43:43 GMT Distribution: inet Content-Type: text/plain; charset=US-ASCII X-Complaints-To: usenet@koala.rhein-neckar.de X-Trace: koala.rhein-neckar.de 898130623 14300 193.197.89.129 (18 Jun 1998 00:43:43 GMT) Organization: yet another Linux box Newsgroups: news.software.nntp