[package] update haproxy to 1.4.1 and add hotplug script (#6875)
authorFlorian Fainelli <florian@openwrt.org>
Fri, 19 Mar 2010 21:02:23 +0000 (21:02 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 19 Mar 2010 21:02:23 +0000 (21:02 +0000)
SVN-Revision: 20309

net/haproxy/Makefile
net/haproxy/files/haproxy.hotplug [new file with mode: 0644]
net/haproxy/files/haproxy.init

index d5491bf..8d2561e 100644 (file)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=1.3.23
+PKG_VERSION:=1.4.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.3/src/
-PKG_MD5SUM:=4ffe926ccf4f4d53f149290eb001fad5
+PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src/
+PKG_MD5SUM:=7f27c2dec3d67fce1b113be5fe878c33
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -51,6 +51,8 @@ define Package/haproxy/install
        $(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/net
+       $(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/net/90-haproxy
 endef
 
 $(eval $(call BuildPackage,haproxy))
diff --git a/net/haproxy/files/haproxy.hotplug b/net/haproxy/files/haproxy.hotplug
new file mode 100644 (file)
index 0000000..d14b5bf
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "$ACTION" = add ]; then
+
+       /etc/init.d/haproxy enabled && \
+               /etc/init.d/haproxy start
+fi
+
index dd8575c..1b6b5a4 100644 (file)
@@ -8,6 +8,12 @@ HAPROXY_BIN="/usr/sbin/haproxy"
 HAPROXY_CONFIG="/etc/haproxy.cfg"
 HAPROXY_PID="/var/run/haproxy.pid"
 
+boot() {
+
+       #Do nothing on boot
+       exit 0
+}
+
 start() {
        [ -x "$HAPROXY_BIN" ] || return 1