[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Web administration - leafwa



Andy Piper schrieb am Dienstag, den 08. Oktober 2002:

> 
> On 2002.10.08 11:24 Matthias Andree wrote:
> >(1.9.28 and the next 2.0.0.alpha) will ship with an
> >unprivileged leafnode-version command (in bin)
> >that just prints the version
> 
> Superb. I'll mock up an example here and have leafwa ready. 
> Thank you.

Actually, leafnode 2 has been installing this command in ${prefix}/bin/
all releases since 2002-01-08 (that is January 8th, see ISO8601), that
comprises beta-2.0b8_ma9, ma10pre*, the snapshots of July and September
and all 2.0.0.alpha.

It has a slightly different format:

version: leafnode-2.0.0.alpha20020930a
current machine: Linux merlin 2.4.19-ma1 #9 Don Sep 19 02:11:55 CEST
2002 i686 unknown
bindir: /usr/local/bin
sysconfdir: /etc/leafnode
spooldir: /var/spool/leafnode
lockfile: /var/lock/news/fetchnews.lck
IPv6: yes
default MTA: /usr/sbin/sendmail

You can pipe this output through head -1 (or just read the first line
and discard the rest) to obtain the version.

So I'll align leafnode-1.9.28 to use the same format as the first line
of this leafnode-2 output.

The current output looks like this, with command line, so this should
make leafwa happy.

leafnode-1 $ ../leafnode-2/leafnode-version | head -1 ; ./leafnode-version
version: leafnode-2.0.0.alpha20020930a
version: leafnode-1.9.28.cvs

If you need this information for other versions, then NNTP is the
simple approach, and I think there are PCRE/regexp classes (which should
usually also support field extraction) and network or NNTP classes --
try here http://www.php.net/manual/en/ref.imap.php
and here http://www.php.net/manual/en/function.imap-open.php and here
http://www.php.net/manual/en/function.preg-match.php -- I didn't look
into details here. I'm not a PHP expert, I just know some buzzwords to
look for :-) Things seem to impose certain requirements on your
installation.

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list