From 0f3f8024461c4ab735a7dd6a19db483bad02c094 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 2 Aug 2014 14:20:00 +0100 Subject: [PATCH] Add dhcpcd-6.4.3, a fully featured yet light weight DHCPv4/IPv4LL/IPv6RS/DHCPv6 quad stack client. Signed-off-by: Roy Marples --- net/dhcpcd/Makefile | 63 ++++++++++++++++++++++++++++++++++++ net/dhcpcd/files/dhcpcd.init | 24 ++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 net/dhcpcd/Makefile create mode 100755 net/dhcpcd/files/dhcpcd.init diff --git a/net/dhcpcd/Makefile b/net/dhcpcd/Makefile new file mode 100644 index 000000000..9add73476 --- /dev/null +++ b/net/dhcpcd/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dhcpcd +PKG_VERSION:=6.4.3 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=ftp://roy.marples.name/pub/dhcpcd \ + http://roy.marples.name/downloads/dhcpcd +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=b22005c131e7108ecf598b6a4ac091eb + +PKG_LICENSE:=BSD-2c +PKG_LICENSE_FILES:= + +PKG_MAINTAINER:=Roy Marples + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dhcpcd + SECTION:=net + CATEGORY:=Network + TITLE:=DHCPv4/IPv4LL/IPv6RS/DHCPv6 quad stack client + URL:=http://roy.marples.name/projects/dhcpcd +endef + +define Package/dhcpcd/description + DHCPv4, IPv6RS and DHCPv6 client with IPv4LL support + dhcpcd is a one stop network management daemon which includes + * RFC compliant DHCPv4 and DHCPv6 clients + * DHCPv6 Prefix Delegation support + * IPv4LL (aka ZeroConf) support + * ARP address conflict resolution + * Link carrier detection + * Wireless SSID profiles + * ARP ping profiles +endef + +CONFIGURE_ARGS+= --prefix=/ --sbindir=/sbin \ + --libexecdir=/lib/dhcpcd --dbdir=/var/dhcpcd + +define Package/dhcpcd/install + $(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/dhcpcd/dhcpcd-hooks + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/dhcpcd $(1)/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/dhcpcd/dhcpcd-run-hooks \ + $(1)/lib/dhcpcd/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/dhcpcd/dhcpcd-hooks/* \ + $(1)/lib/dhcpcd/dhcpcd-hooks/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dhcpcd.init $(1)/etc/init.d/dhcpcd + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/dhcpcd.conf $(1)/etc/dhcpcd.conf +endef + +$(eval $(call BuildPackage,dhcpcd)) diff --git a/net/dhcpcd/files/dhcpcd.init b/net/dhcpcd/files/dhcpcd.init new file mode 100755 index 000000000..2fad41dd4 --- /dev/null +++ b/net/dhcpcd/files/dhcpcd.init @@ -0,0 +1,24 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +START=30 +STOP=85 +USE_PROCD=1 + +start_service() +{ + procd_open_instance + procd_set_param command /sbin/dhcpcd -B + procd_set_param respawn + procd_close_instance +} + +reload_service() +{ + /sbin/dhcpcd -n +}