Ok now...

Signed-off-by: Giovanni Di Stasi <[email protected]>

--

Index: net/omf/files/nodeagent.yaml
===================================================================
--- net/omf/files/nodeagent.yaml        (revision 0)
+++ net/omf/files/nodeagent.yaml        (revision 0)
@@ -0,0 +1,70 @@
+#
+# Copyright (c) 2006-2008 National ICT Australia (NICTA), Australia
+#
+# Copyright (c) 2004-2008 WINLAB, Rutgers University, USA
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+#
+# NOTE: use only 'spaces' to indent !
+# ('tab' indents are not supported by the ruby yaml parser used to read this 
file)
+#
+# This is the Config file for the NodeAgent4 on the WINLAB platform
+#
+---
+nodeagent:
+  # Communication settings
+  comm:
+
+    # How many seconds can we go without a message from the node handler
+    # before we assume we have lost connectivity and need to reset
+    handler_timeout: 40
+
+    # Number of consecutive handler timeouts before a 'handler lost'
+    # will be declared.
+    timeout_count: 2
+
+    # Number of seconds to wait between consecutive RETRY requests
+    retry_interval: 3
+
+    # Number of seconds between consecutive HEARTBEAT messages
+    heartbeat_interval: 10
+
+    # Pause between resending previous messages
+    resend_interval: 0.1
+
+    # Currently the node Agent has the choice between two types
+    # of Communicators to use to talk to the node Handler:
+    # i)  Multicast Communicator
+    # ii) TCP Server Communicator
+    #
+    # To enable/disable i) uncomment/comment the following lines
+    #
+    #listen_addr: 224.4.0.1
+    #listen_port: 9006
+    #handler_addr: 224.4.0.2
+    #handler_port: 9002
+    #local_if: eth1 # Control Interface used with Multicast Comm.
+    #
+    # To enable/disable ii) uncomment/comment the following lines
+    server_port: 9026
+    # local_if: Control Interface used with TCPServer Comm.
+    local_if: eth0
+
+
Index: net/omf/files/nodeagent4
===================================================================
--- net/omf/files/nodeagent4    (revision 0)
+++ net/omf/files/nodeagent4    (revision 0)
@@ -0,0 +1,12 @@
+#!/bin/sh
+PDIR=/opt/nodeagent4-4.4.0
+APP=nodeAgent.rb
+
+export PATH=$PDIR/sbin:$PATH
+#export LD_LIBRARY_PATH=$PDIR/sbin:LD_LIBRARY_PATH
+export RUBYLIB=/usr/lib/ruby/1.8:/usr/lib/ruby/1.8/:$PDIR/lib
+export RUBYHOME=$PDIR
+
+exec ruby $PDIR/app/$APP $*
+
+

Property changes on: net/omf/files/nodeagent4
___________________________________________________________________
Added: svn:executable
   + *

Index: net/omf/files/nodeagent4.init
===================================================================
--- net/omf/files/nodeagent4.init       (revision 0)
+++ net/omf/files/nodeagent4.init       (revision 0)
@@ -0,0 +1,30 @@
+#!/bin/sh /etc/rc.common
+#Copyright (C) 2006 OpenWrt.org
+#
+# nodeagent init script to start nodeagent daemon
+#
+#     Written by Giovanni Di Stasi <[email protected]>.
+#
+# Version: $Id:$
+#
+START=80
+
+
+start(){
+       export PATH=$PATH:/usr/local/l2r/bin/
+       NAME=nodeagent4
+
+       test -x /usr/sbin/$NAME || exit 0
+
+       if [ -f /etc/$NAME/nodeagent.cfg ]; then
+          . /etc/$NAME/nodeagent.cfg
+       fi
+
+       if [ -f /etc/default/$NAME ]; then
+           . /etc/default/$NAME
+       fi
+
+       /usr/sbin/$NAME &       
+}
+
+

Property changes on: net/omf/files/nodeagent4.init
___________________________________________________________________
Added: svn:executable
   + *

Index: net/omf/Makefile
===================================================================
--- net/omf/Makefile    (revision 0)
+++ net/omf/Makefile    (revision 0)
@@ -0,0 +1,84 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=omf
+PKG_VERSION:=1
+PKG_RELEASE:=3
+
+NODEAGENT_VERSION:=4.4.0
+
+PKG_SOURCE:=omf-${PKG_VERSION}.${PKG_RELEASE}.tar.bz2
+PKG_SOURCE_URL:=ftp://143.225.229.58/apps/
+PKG_MD5SUM:=f3f23f3673491bf1c1ea549c1995aa7f
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/omf
+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/omf/Default
+  TITLE:=OMF (cOntrol and Management Framework)
+  SECTION:=net
+  CATEGORY:=Network
+  URL:=http://omf.mytestbed.net
+  MAINTAINER:=Giovanni Di Stasi <[email protected]>
+endef
+
+define Package/omf
+  $(call Package/omf/Default)
+endef
+
+define Package/omf-nodeagent
+  $(call Package/omf/Default)
+  TITLE+= (NodeAgent)
+  DEPENDS+= +pciutils +xmpp4r
+endef
+
+
+define Build/Compile
+       $(INSTALL_DIR) $(PKG_INSTALL_DIR)
+
+       $(call Build/Compile/Default, \
+               -C $(PKG_BUILD_DIR)/nodeAgent app-ruby 
INSTALL_DIR="$(PKG_INSTALL_DIR)" \
+       )
+endef
+
+
+
+define Package/omf-nodeagent/install
+
+       $(INSTALL_DIR) $(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/
+
+       $(CP) $(PKG_INSTALL_DIR)/nodeagent4/* 
$(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/
+
+       $(RM) $(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/lib/*.so \
+         $(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/sbin/libruby1.8.so.1.8 \
+         $(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/sbin/ld-linux.so.2 \
+         $(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/sbin/ruby1.8 \
+         $(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/lib/digest/*.so
+       $(RM) -r $(1)/opt/nodeagent4-$(NODEAGENT_VERSION)/lib/xmpp4r*
+
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) ./files/nodeagent4 $(1)/usr/sbin/
+       
+       $(INSTALL_DIR) $(1)/etc/nodeagent4
+       $(INSTALL_DATA) ./files/nodeagent.yaml $(1)/etc/nodeagent4/
+
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) ./files/nodeagent4.init $(1)/etc/init.d/nodeagent4
+       
+       $(INSTALL_DIR) $(1)/etc/rc.d/
+       ln -fs /etc/init.d/nodeagent4 $(1)/etc/rc.d/80nodeagent4
+
+endef
+
+
+$(eval $(call BuildPackage,omf-nodeagent))
+
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to