diff --git a/net/lsm/Makefile b/net/lsm/Makefile index 864327de5..dbbf38925 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 000000000..087a895e7 --- /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 16f9d04ad..ca733728c 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 61895b2d6..a373b311b 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 -exit 0; +/sbin/shorewall-lite show routing > /var/log/lsm + +exit 0 #EOF