bart<bart@isiskorea.com> writes:
> Hi,world~
>
> I remenber I saw something like this somewhere in this site,but I can't find
> the solution.
>
> When I set the event configuration to send the email,
> I send messages something like this
>
> echo "$hostname" "$MSG "| mailx -r <mail_server> -s "$HOST $MSG"
> nmsadmin@isiskorea.com ;;
>
> the action works well...
>
> But,when the hostname or messages contains ip_adress,
> it displays "" infront of the "dot" like this xxx\\.xxx\\.xxx\\.xxx\\.
>
> How can i eliminate the "" ?
As part of a security fix from a root exploit vulnerability, by
default, when send trap vabinds to external scripts, Netview escapes
- and . with a backslash and replaces all other non-alphanumerics with
an _.
See the release notes for your version of NetView for more details and
for sed commands that strips the backslashes out in the external
script.
Example from a script of mine:
############################################################################
# replace \- \. and \_ with - . and _ respectvely. Required for
# security efix
############################################################################
TEMP_HOST=$(/usr/bin/echo "$5" | /usr/bin/sed 's:\\\([-\._]\):\1:g')
MESSAGESTRING=$(/usr/bin/echo "$1" | /usr/bin/sed 's:\\\([-\._]\):\1:g')
--
Todd H.
http://www.toddh.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com
*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)
|