This updates the lsm package in feeds/packages to 0.60.

It includes a shorewall-lite hook so that if one has lsm and
shorewall-lite installed, lsm will cycle shorewall-lite on a link
transition.

Signed-off-by: Brian J. Murrell <brian <at> interlinx.bc.ca>

From 30de624404fcf83e211b3d21bd891d3dd03e8e3e Mon Sep 17 00:00:00 2001
From: Brian J. Murrell <br...@interlinx.bc.ca>
Date: Sun, 10 Oct 2010 09:49:01 -0400
Subject: [PATCH 2/2] upgrade to 0.60

Upgrade to new upstream version 0.60.
Better handle the tarball extraction and target relocation.
New initscript using start-stop-daemon.
Enable the reopen reopen_on_enodev feature so that restarted PPP
interfaces are better tracked.
---
net/lsm/Makefile       |   12 ++++--------
net/lsm/files/lsm.conf |    1 +
net/lsm/files/lsm.init |   40 ++++++++++++++++++++++++++++++++++++----
3 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/net/lsm/Makefile b/net/lsm/Makefile
index 1aa3d2d..7fd0faa 100644
--- a/net/lsm/Makefile
+++ b/net/lsm/Makefile
@@ -8,15 +8,17 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=lsm
-PKG_VERSION:=0.53
+PKG_VERSION:=0.60
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://lsm.foobar.fi/download
-PKG_MD5SUM:=983911b434a3c649fcefdc99e6ea2f37
+PKG_MD5SUM:=f4748308c0a1caa98d7e756778954116

include $(INCLUDE_DIR)/package.mk

+PKG_UNPACK += && rmdir $(PKG_BUILD_DIR) && mv $(BUILD_DIR)/lsm
$(PKG_BUILD_DIR)
+
define Package/lsm
   SECTION:=net
   CATEGORY:=Network
@@ -34,12 +36,6 @@ define Package/lsm/conffiles
/etc/lsm/lsm.conf
endef

-define Build/Prepare
- $(call Build/Prepare/Default)
- rmdir $(PKG_BUILD_DIR)
- mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR)
-endef
-
define Build/Compile
echo sed -ie 's/\$$$$(CC)/mipsel-openwrt-linux-uclibc-gcc/g'
$(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC)
diff --git a/net/lsm/files/lsm.conf b/net/lsm/files/lsm.conf
index ce54cea..16f9d04 100644
--- a/net/lsm/files/lsm.conf
+++ b/net/lsm/files/lsm.conf
@@ -12,6 +12,7 @@
#debug=10
#debug=9
debug=8
+reopen_on_enodev=1

#
# Defaults for the connection entries
diff --git a/net/lsm/files/lsm.init b/net/lsm/files/lsm.init
index e9d3162..d1ca4ff 100644
--- a/net/lsm/files/lsm.init
+++ b/net/lsm/files/lsm.init
@@ -1,12 +1,44 @@
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
-START=50
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+NAME=lsm
+PROG=/usr/sbin/$NAME
+DESC="Link State Monitor"
+PIDFILE=/var/run/lsm.pid
+START=45
+
+test -x $PROG || exit 0
+set -e

start() {
- lsm /etc/lsm/lsm.conf
+ echo -n "Starting $DESC: $NAME"
+ start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+
+ echo "."
}

stop() {
- killall lsm
+ echo -n "Stopping $DESC: $NAME"
+ start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+ echo "."
}

+restart() {
+ echo -n "Restarting $DESC: $NAME... "
+ start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+ sleep 1
+ start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf
$PIDFILE
+ echo "done."
+}
+
+reload() {
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ echo -n "Reloading $DESC configuration... "
+ start-stop-daemon -q -K -s HUP -p $PIDFILE -x $PROG
-- /etc/lsm/lsm.conf $PIDFILE
+ echo "done."
+}
-- 
1.7.0.4


Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to