mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
2007-01-04 Sancho Lerena <slerena@artica.es>
* Linux/pandora_agent.sh: Solved problem with encoding. Now XML its parsed before sending it, replacing all & characters. NOTE: This changes needs to be copied to AIX, Solaris, HPUX and BSD agents. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@350 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
109b0c9184
commit
4fecef783c
@ -1,3 +1,8 @@
|
|||||||
|
2007-01-04 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
|
* Linux/pandora_agent.sh: Solved problem with encoding. Now XML
|
||||||
|
its parsed before sending it, replacing all & characters.
|
||||||
|
|
||||||
2007-01-03 Sancho Lerena <slerena@artica.es>
|
2007-01-03 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* Linux/pandora_agent.conf: Added more tokens to config
|
* Linux/pandora_agent.conf: Added more tokens to config
|
||||||
|
@ -42,10 +42,11 @@ CHECKSUM_MODE=1
|
|||||||
DEBUG_MODE=0
|
DEBUG_MODE=0
|
||||||
SERVER_PORT=22
|
SERVER_PORT=22
|
||||||
INTERVAL=300
|
INTERVAL=300
|
||||||
ENCODING=`echo $LANG | cut -f 2 -d "."`
|
if [ -z "`echo $LANG | grep '\.'`" ]
|
||||||
if [ -z "$ENCODING" ]
|
|
||||||
then
|
then
|
||||||
ENCODING="iso-8859-1"
|
ENCODING="iso-8859-1"
|
||||||
|
else
|
||||||
|
ENCODING=`echo $LANG | cut -f 2 -d "."`
|
||||||
fi
|
fi
|
||||||
NOMBRE_HOST=`/bin/hostname`
|
NOMBRE_HOST=`/bin/hostname`
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
@ -146,6 +147,7 @@ fi
|
|||||||
# Script banner at start
|
# Script banner at start
|
||||||
echo "Pandora FMS Agent $AGENT_VERSION (c) Sancho Lerena, and others 2007"
|
echo "Pandora FMS Agent $AGENT_VERSION (c) Sancho Lerena, and others 2007"
|
||||||
echo "This program is licensed under GPL Terms. http://pandora.sf.net"
|
echo "This program is licensed under GPL Terms. http://pandora.sf.net"
|
||||||
|
echo "Running in $NOMBRE_HOST at $TIMESTAMP \n"
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
if [ "$DEBUG_MODE" == "1" ]
|
if [ "$DEBUG_MODE" == "1" ]
|
||||||
@ -290,6 +292,13 @@ do
|
|||||||
|
|
||||||
# Finish data packet
|
# Finish data packet
|
||||||
echo "</agent_data>" >> $DATA
|
echo "</agent_data>" >> $DATA
|
||||||
|
echo "" >> $DATA
|
||||||
|
|
||||||
|
# Replace & chars in XML (should not to be any) to avoid syntax problems
|
||||||
|
sed "s/&/&/g" $DATA > $TEMP/finalxml.tmp
|
||||||
|
rm -f $DATA
|
||||||
|
mv $TEMP/finalxml.tmp $DATA
|
||||||
|
|
||||||
if [ "$DEBUG_MODE" == "1" ]
|
if [ "$DEBUG_MODE" == "1" ]
|
||||||
then
|
then
|
||||||
echo "$TIMESTAMP - Finish writing XML $DATA" >> $PANDORA_LOGFILE
|
echo "$TIMESTAMP - Finish writing XML $DATA" >> $PANDORA_LOGFILE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user