From ca7961a828519d81ca015966f2c2be01dc40e78d Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 20 Jun 2008 11:02:41 +0000 Subject: [PATCH] 2008-06-20 Ramon Novoa * openWRT/pandora_agent, openWRT/pandora_agent.conf: Added support for Tentacle. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 5 +++++ pandora_agents/openWRT/pandora_agent | 19 +++++++++++++++---- pandora_agents/openWRT/pandora_agent.conf | 8 ++++---- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index f080bf636e..3d936c354d 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,8 @@ +2008-06-20 Ramon Novoa + + * openWRT/pandora_agent, openWRT/pandora_agent.conf: Added support for + Tentacle. + 2008-06-19 Ramon Novoa * win32/bin/PandoraAgent.exe: Updated to r888. diff --git a/pandora_agents/openWRT/pandora_agent b/pandora_agents/openWRT/pandora_agent index e50fb9b292..9f28379a56 100755 --- a/pandora_agents/openWRT/pandora_agent +++ b/pandora_agents/openWRT/pandora_agent @@ -41,9 +41,9 @@ IFS=" # Default values CHECKSUM_MODE=1 DEBUG_MODE=0 -SERVER_PORT=21 +SERVER_PORT=41121 INTERVAL=300 -TRANSFER_MODE=ftp +TRANSFER_MODE=tentacle SERVER_PWD=pandora123 if [ -z "`echo $LANG | grep '\.'`" ] then @@ -114,6 +114,11 @@ do SERVER_PWD=`echo $a | awk '{ print $2 }' ` echo "$TIMESTAMP - [SETUP] - Server password set (FTP)" >> $PANDORA_LOGFILE fi + if [ ! -z "`echo $a | grep -e '^transfer_mode'`" ] + then + TRANSFER_MODE=`echo $a | awk '{ print $2 }' ` + echo "$TIMESTAMP - [SETUP] - Transfer mode is $TRANSFER_MODE" >> $PANDORA_LOGFILE + fi done @@ -267,8 +272,14 @@ do exit 0 fi - cd $TEMP - wput -q $NOMBRE_HOST.$SERIAL.data ftp://pandora:$SERVER_PWD@$SERVER_IP:$SERVER_PORT + cd $TEMP + if [ "$TRANSFER_MODE" = "ftp" ] + then + wput -q $NOMBRE_HOST.$SERIAL.data ftp://pandora:$SERVER_PWD@$SERVER_IP:$SERVER_PORT + else + tentacle_client -a $SERVER_IP -p $SERVER_PORT $NOMBRE_HOST.$SERIAL.data + fi + # Delete data rm -f $DATA 2> $PANDORA_LOGFILE.err diff --git a/pandora_agents/openWRT/pandora_agent.conf b/pandora_agents/openWRT/pandora_agent.conf index 963312202e..5d73e6c0b9 100755 --- a/pandora_agents/openWRT/pandora_agent.conf +++ b/pandora_agents/openWRT/pandora_agent.conf @@ -24,11 +24,11 @@ agent_name arduinoasus # By default agent try to take default encoding defined in host. # encoding iso-8859-15 -# By default is 21 for ftp -server_port 21 +# 41121 by default. +server_port 41121 -# only ftp at this time. -transfer_mode ftp +# tentacle by default. ftp or tentacle. +transfer_mode tentacle # server pass