pcp
[Top] [All Lists]

Re: pmlogger_check.sh in 2.3.1-4

To: <kenmcd@xxxxxxxxxxxxxxxxx>, <ahoyt@xxxxxxxxxxxxx>
Subject: Re: pmlogger_check.sh in 2.3.1-4
From: "David Douthitt" <DDouthitt@xxxxxxxxx>
Date: Wed, 06 Aug 2003 17:11:32 -0500
Cc: "<PCP" <pcp@xxxxxxxxxxx>
Sender: pcp-bounce@xxxxxxxxxxx
If you are using ksh, why not this?

LOCALHOSTNAME=`hostname`
LOCALHOSTNAME=${LOCALHOSTNAME%%.*}

That removes the need for a pipe and for a sed run...

David Douthitt
CUNA & Affiliates
UNIX Systems Administrator
LPI Level 1, Linux+
ddouthitt@xxxxxxxxx


>>> Ken McDonell <kenmcd@xxxxxxxxxxxxxxxxx> 8/6/03 5:05PM >>>
Thanks Alan, for confiming this was not a gratuitous change.

Keith Owens suggested this quick and robust workaround ...

        LOCALHOSTNAME=`hostname | sed -e 's/\..*//'`

I'm planning on checking this into the code base.

On Wed, 6 Aug 2003, Alan Hoyt wrote:

> Alan Hoyt wrote:
> ...
>
> Ok, the logger control file specifies the logger instance
(controlling
> pmlogger_check) and this change fixed the inability to stipulate
short
> names in the control file - so it's necessary to work for all cases.





<Prev in Thread] Current Thread [Next in Thread>