From: nbd Date: Sun, 22 Nov 2009 03:48:32 +0000 (+0000) Subject: Fix and upgrade the ahcpd package X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=7419c6ce1d93b0aca9179dca6811603fb31abc63;p=packages.git Fix and upgrade the ahcpd package - upgrades ahcpd to the latest release (0.50), - adds librt dependency to the Makefile, - removes the installation of the obsolete ahcp-dummy-config.sh file, - fixes the ahcpd.init file to ensure compatibility with ahcpd 0.50, options, and provide a sane default behaviour (forward ahcpd messages without performing any configuration). Signed-off-by: Gabriel Kerneis git-svn-id: svn://svn.openwrt.org/openwrt/packages@18460 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/ipv6/ahcpd/Makefile b/ipv6/ahcpd/Makefile index 870d8bab8..a273e44c9 100644 --- a/ipv6/ahcpd/Makefile +++ b/ipv6/ahcpd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ahcpd -PKG_VERSION:=0.5 -PKG_RELEASE:=2 +PKG_VERSION:=0.50 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/ -PKG_MD5SUM:=0e5fe1199161eeef214c43eca7eec9a1 +PKG_MD5SUM:=627ec199784c60e5250651f82511fff2 include $(INCLUDE_DIR)/package.mk @@ -22,7 +22,7 @@ define Package/ahcpd CATEGORY:=IPv6 TITLE:=Ad-Hoc Configuration Protocol daemon URL:=http://www.pps.jussieu.fr/~jch/software/ahcp/ - DEPENDS:=+kmod-ipv6 +ip + DEPENDS:=+kmod-ipv6 +ip +librt endef define Package/ahcpd/description @@ -52,9 +52,8 @@ endef define Package/ahcpd/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp-generate{,-address} $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/lib/ahcp - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp{,-dummy}-config.sh $(1)/usr/lib/ahcp/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp-config.sh $(1)/usr/lib/ahcp/ $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcpd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/config diff --git a/ipv6/ahcpd/files/ahcpd.config b/ipv6/ahcpd/files/ahcpd.config index 58db58bc5..dc9186c6f 100755 --- a/ipv6/ahcpd/files/ahcpd.config +++ b/ipv6/ahcpd/files/ahcpd.config @@ -1,4 +1,6 @@ config ahcpd option interfaces "wl0" + option no_config true option no_dns false - option no_ipv4 true + option ipv4_only false + option ipv6_only false diff --git a/ipv6/ahcpd/files/ahcpd.init b/ipv6/ahcpd/files/ahcpd.init index efd80d3c4..5b0fe1965 100644 --- a/ipv6/ahcpd/files/ahcpd.init +++ b/ipv6/ahcpd/files/ahcpd.init @@ -7,7 +7,9 @@ pidfile=/var/run/ahcpd.pid ahcpd_config() { local cfg="$1" config_get interfaces "$cfg" interfaces - config_get_bool no_ipv4 "$cfg" no_ipv4 0 + config_get_bool no_config "$cfg" no_config 0 + config_get_bool ipv4_only "$cfg" ipv4_only 0 + config_get_bool ipv6_only "$cfg" ipv6_only 0 config_get_bool no_dns "$cfg" no_dns 0 } @@ -15,9 +17,14 @@ start() { config_load ahcpd config_foreach ahcpd_config ahcpd mkdir -p /var/lib - [ -r /usr/lib/ahcp/ahcp.dat ] && authority="-a /usr/lib/ahcp/ahcp.dat" - if [ "$no_ipv4" -eq 0 ]; then - unset no_ipv4 + if [ "$no_config" -eq 0 ]; then + unset no_config + fi + if [ "$ipv4_only" -eq 0 ]; then + unset ipv4_only + fi + if [ "$ipv6_only" -eq 0 ]; then + unset ipv6_only fi if [ "$no_dns" -eq 0 ]; then unset no_dns @@ -25,7 +32,9 @@ start() { if [ -e $pidfile ] ; then echo "$pidfile exists -- not starting ahcpd." >&2 else - /usr/sbin/ahcpd -D -I $pidfile ${no_ipv4:+-s} ${no_dns:+-N} $authority $interfaces + /usr/sbin/ahcpd -s /usr/lib/ahcp/ahcp-config.sh -D -I $pidfile \ + ${ipv4_only:+-4} ${ipv6_only:+-6} ${no_dns:+-N} ${no_config:+-n} \ + $interfaces fi }