[packages] wide-dhcpv6: Add debug option to dhcp6c
authorAndrew Byrne <openwrt@andy.id.au>
Sun, 4 Apr 2010 06:41:00 +0000 (06:41 +0000)
committerAndrew Byrne <openwrt@andy.id.au>
Sun, 4 Apr 2010 06:41:00 +0000 (06:41 +0000)
SVN-Revision: 20691

ipv6/wide-dhcpv6/Makefile
ipv6/wide-dhcpv6/files/dhcp6c.conf
ipv6/wide-dhcpv6/files/dhcp6c.init

index 32fae025d9a4f1d6563317a4dfcc7aa5132f9baa..c293133b35e4c41c84a74f012f65f1fcd13fa94f 100644 (file)
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wide-dhcpv6
 PKG_VERSION:=20080615
 
 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)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
index 9ea543c83bceafd391cc571d64eb8f816ac30226..cd3ee77b969b83a8c6a6ad3c0b84f733648482ed 100644 (file)
@@ -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 '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
        
        # Send options (1 = send; 0 = do not send)
        option 'pd' '1'                                 # Prefix Delegation
index 4be165d8afe015fb849b2467f1740665014eb83f..ea15262c4075050cc583c5b16ff7e812369b6cb4 100644 (file)
@@ -109,7 +109,11 @@ start() {
        mkdir -m 755 -p /var/etc
        dhcp6c_write_config > $config_file
        
        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
        
        sleep 3
        ACTION=start /sbin/hotplug-call dhcp6c