From c3b6bbd2d80615c5e6823dec5a4686b55c07cb40 Mon Sep 17 00:00:00 2001 From: abyrne Date: Sun, 4 Apr 2010 06:41:00 +0000 Subject: [PATCH] [packages] wide-dhcpv6: Add debug option to dhcp6c git-svn-id: svn://svn.openwrt.org/openwrt/packages@20691 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ipv6/wide-dhcpv6/Makefile | 2 +- ipv6/wide-dhcpv6/files/dhcp6c.conf | 1 + ipv6/wide-dhcpv6/files/dhcp6c.init | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ipv6/wide-dhcpv6/Makefile b/ipv6/wide-dhcpv6/Makefile index 32fae025d..c293133b3 100644 --- a/ipv6/wide-dhcpv6/Makefile +++ b/ipv6/wide-dhcpv6/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wide-dhcpv6 PKG_VERSION:=20080615 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) diff --git a/ipv6/wide-dhcpv6/files/dhcp6c.conf b/ipv6/wide-dhcpv6/files/dhcp6c.conf index 9ea543c83..cd3ee77b9 100644 --- a/ipv6/wide-dhcpv6/files/dhcp6c.conf +++ b/ipv6/wide-dhcpv6/files/dhcp6c.conf @@ -2,6 +2,7 @@ config 'dhcp6c' 'basic' option 'enabled' '0' # 1 = enabled; 0 = disabled option 'interface' 'wan' # This is the interface the DHCPv6 client will run on option 'dns' 'dnsmasq' # Which DNS server you run (only dnsmasq currently supported) + option 'debug' '0' # 1 = enable debugging; 0 = disable debugging # Send options (1 = send; 0 = do not send) option 'pd' '1' # Prefix Delegation diff --git a/ipv6/wide-dhcpv6/files/dhcp6c.init b/ipv6/wide-dhcpv6/files/dhcp6c.init index 4be165d8a..ea15262c4 100644 --- a/ipv6/wide-dhcpv6/files/dhcp6c.init +++ b/ipv6/wide-dhcpv6/files/dhcp6c.init @@ -109,7 +109,11 @@ start() { mkdir -m 755 -p /var/etc dhcp6c_write_config > $config_file - /usr/sbin/dhcp6c -c $config_file $client_ifname + local debug + local debug_option + config_get_bool debug basic debug 0 + [ $debug -eq 1 ] && debug_option="-D" + /usr/sbin/dhcp6c -c $config_file $debug_option $client_ifname sleep 3 ACTION=start /sbin/hotplug-call dhcp6c