nv-l

Re: EXEC in trapd.conf

2001-06-12 21:13:49
Subject: Re: EXEC in trapd.conf
From: "Les Dickert" <lesdickert AT hotmail DOT com>
To: nv-l AT lists.tivoli DOT com
Date: Tue, 12 Jun 2001 21:13:49
Another thing you may want to try is to
enclose the $1 in a double set of quotes
like this:

   "'$1'"

so when the command gets executed the first
parameter on the shell command line will
be

  'whatever arg 1 was in the trap even (<>)'

and the single quotes should tell the shell
to leave what's inside alone, thereby making
any special characters OK.

Les Dickert
Verisign Consulting


>From: "Francois Le Hir/Quebec/IBM" <flehir AT CA.IBM DOT COM>
>Reply-To: IBM NetView Discussion <nv-l AT tkg DOT com>
>To: nv-l AT tkg DOT com
>Subject: [NV-L] EXEC in trapd.conf
>Date: Tue, 12 Jun 2001 14:34:24 -0400
>
>
>Hi,
>
>I am using some EXEC command in /usr/OV/conf/C/trapd.conf in order to
>execute a script when I receive a specific trap.
>I use the following syntax:
>EXEC /usr/script/trappopup keyword $1
>unfortunately, in some cases, the $1 parameter contain some character (, <
>or >.
>when this appends the script doesn't get executed and I get an error in
>/usr/OV/log/ovactiond.log.
>
>I tried to use EXEC /usr/script/trappopup keyword "$1" but it doesn't
>change anything.
>
>I can not change the text of the message of the trap.
>any idea ?
>
>Regards,
>
>Francois Le Hir
>Network Projects & Consulting Services
>IBM Global Services
>Phone: (514) 205 6695
>
>
>_________________________________________________________________________
>NV-L List information and Archives: http://www.tkg.com/nv-l

_________________________________________________________________


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