From 5d5bd183a8b3c825ae2004ee3e15bbdcc455a231 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 19 Mar 2010 21:02:23 +0000 Subject: [PATCH] [package] update haproxy to 1.4.1 and add hotplug script (#6875) git-svn-id: svn://svn.openwrt.org/openwrt/packages@20309 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/haproxy/Makefile | 8 +++++--- net/haproxy/files/haproxy.hotplug | 8 ++++++++ net/haproxy/files/haproxy.init | 6 ++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 net/haproxy/files/haproxy.hotplug diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index d5491bfa4..8d2561e77 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -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 index 000000000..d14b5bf3f --- /dev/null +++ b/net/haproxy/files/haproxy.hotplug @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$ACTION" = add ]; then + + /etc/init.d/haproxy enabled && \ + /etc/init.d/haproxy start +fi + diff --git a/net/haproxy/files/haproxy.init b/net/haproxy/files/haproxy.init index dd8575ce4..1b6b5a49b 100644 --- a/net/haproxy/files/haproxy.init +++ b/net/haproxy/files/haproxy.init @@ -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 -- 2.11.0