From: Florian Fainelli Date: Mon, 13 Aug 2012 14:08:30 +0000 (+0000) Subject: [package] lsm: update to 0.131 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=de2ff0985cc55f06eb5bf83d6214477f8a923c28;p=openwrt%2Fsvn-archive%2Farchive.git [package] lsm: update to 0.131 his patch updates link state monitor (lsm) to release 0.131, add sample connections.conf and update lsm.conf and lsm_script Signed-off-by: Edy Corak SVN-Revision: 33166 --- diff --git a/net/lsm/Makefile b/net/lsm/Makefile index 864327de56..dbbf389259 100644 --- a/net/lsm/Makefile +++ b/net/lsm/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lsm -PKG_VERSION:=0.60 -PKG_RELEASE:=3 +PKG_VERSION:=0.131 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://lsm.foobar.fi/download -PKG_MD5SUM:=f4748308c0a1caa98d7e756778954116 +PKG_MD5SUM:=c3ff15f5e0d3988a1a45f35392639d40 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -48,12 +48,14 @@ define Package/lsm/install $(INSTALL_DIR) $(1)/etc/lsm $(INSTALL_DIR) $(1)/etc/lsm/script.d $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DATA) ./files/connections.conf $(1)/etc/lsm/connections.conf $(INSTALL_DATA) ./files/lsm.conf $(1)/etc/lsm/lsm.conf $(INSTALL_BIN) ./files/lsm_script $(1)/etc/lsm/script $(INSTALL_BIN) ./files/lsm.init $(1)/etc/init.d/lsm endef define Package/lsm/conffiles +/etc/lsm/connections.conf /etc/lsm/lsm.conf endef diff --git a/net/lsm/files/connections.conf b/net/lsm/files/connections.conf new file mode 100644 index 0000000000..087a895e7e --- /dev/null +++ b/net/lsm/files/connections.conf @@ -0,0 +1,13 @@ +connection { + name=Provider1 + checkip=1.1.1.1 + device=pppoe-wan + ttl=2 +} + +connection { + name=Provider2 + checkip=2.2.2.2 + device=eth0.2 + ttl=1 +} diff --git a/net/lsm/files/lsm.conf b/net/lsm/files/lsm.conf index 16f9d04ad5..ca733728cd 100644 --- a/net/lsm/files/lsm.conf +++ b/net/lsm/files/lsm.conf @@ -1,4 +1,3 @@ - # # (C) 2009 Mika Ilmaranta # @@ -12,7 +11,7 @@ #debug=10 #debug=9 debug=8 -reopen_on_enodev=1 +# reopen_on_enodev=1 # # Defaults for the connection entries @@ -21,7 +20,7 @@ defaults { name=defaults checkip=127.0.0.1 eventscript=/etc/lsm/script - max_packet_loss=15 + max_packet_loss=20 max_successive_pkts_lost=7 min_packet_loss=5 min_successive_pkts_rcvd=10 diff --git a/net/lsm/files/lsm_script b/net/lsm/files/lsm_script index 61895b2d63..a373b311b5 100644 --- a/net/lsm/files/lsm_script +++ b/net/lsm/files/lsm_script @@ -1,14 +1,11 @@ #!/bin/sh # -# (C) 2009 Mika Ilmaranta +# (C) 2009 Mika Ilmaranta +# (C) 2009 Tom Eastep # # License: GPLv2 # -# -# default event handling script -# - DATE=$(/bin/date) STATE=${1} @@ -25,42 +22,56 @@ CONS_WAIT=${11} CONS_MISS=${12} AVG_RTT=${13} -cat < ${VARDIR}/${DEVICE}.status # Uncomment this line if you are running Shorewall 4.4.x or earlier + ${VARDIR}/firewall enable ${DEVICE} +else + echo 1 > ${VARDIR}/${DEVICE}.status # Uncomment this line if you are running Shorewall 4.4.x or earlier + ${VARDIR}/firewall disable ${DEVICE} +fi + +/sbin/shorewall-lite show routing > /var/log/lsm -exit 0; +exit 0 #EOF