# HG changeset patch # User Pascal Bellard # Date 1244733101 -7200 # Node ID bedf285c387c12f1cd75624a580821bbac07caf2 # Parent f21f0b5b51c2466af849e8b17107ee21e7bd2e1e Add dhcp6 diff -r f21f0b5b51c2 -r bedf285c387c dhcp/receipt --- a/dhcp/receipt Thu Jun 11 17:10:09 2009 +0200 +++ b/dhcp/receipt Thu Jun 11 17:11:41 2009 +0200 @@ -16,6 +16,7 @@ { cd $src ./configure --prefix=/usr --infodir=/usr/share/info \ + --disable-dhcpv6 \ --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS && \ make && make DESTDIR=$PWD/_pkg install } diff -r f21f0b5b51c2 -r bedf285c387c dhcp6-client/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcp6-client/receipt Thu Jun 11 17:11:41 2009 +0200 @@ -0,0 +1,23 @@ +# SliTaz package receipt. + +PACKAGE="dhcp6-client" +VERSION="4.1.1b1" +CATEGORY="network" +SHORT_DESC="Dynamic Host Configuration Protocol ISC client with ipv6 support." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.isc.org/products/DHCP/" +WANTED="dhcp6" +DEPENDS="libcrypto" +CONFIG_FILES="/etc/dhclient.conf" +PROVIDE="dhcp-client" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/sbin $fs/usr/bin $fs/etc + cp $_pkg/etc/dhclient.conf $fs/etc + cp $_pkg/../client/scripts/linux $fs/etc/dhclient-script + cp $_pkg/usr/sbin/dhclient $fs/usr/sbin + cp $_pkg/usr/bin/omshell $fs/usr/bin +} + diff -r f21f0b5b51c2 -r bedf285c387c dhcp6-relay/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcp6-relay/receipt Thu Jun 11 17:11:41 2009 +0200 @@ -0,0 +1,19 @@ +# SliTaz package receipt. + +PACKAGE="dhcp6-relay" +VERSION="4.1.1b1" +CATEGORY="network" +SHORT_DESC="Dynamic Host Configuration Protocol relay with ipv6 support." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.isc.org/products/DHCP/" +DEPENDS="libcrypto" +WANTED="dhcp6" +PROVIDE="dhcp-relay" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/sbin + cp -a $_pkg/usr/sbin/dhcrelay $fs/usr/sbin +} + diff -r f21f0b5b51c2 -r bedf285c387c dhcp6/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcp6/receipt Thu Jun 11 17:11:41 2009 +0200 @@ -0,0 +1,41 @@ +# SliTaz package receipt. + +PACKAGE="dhcp6" +VERSION="4.1.1b1" +CATEGORY="network" +SHORT_DESC="Dynamic Host Configuration Protocol server with ipv6 support." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.isc.org/products/DHCP/" +WGET_URL="http://ftp.isc.org/isc/$PACKAGE/$TARBALL" +DEPENDS="libcrypto" +CONFIG_FILES="/etc/dhcpd.conf" +PROVIDE="dhcp" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + for i in start-without-ipv6 ; do + [ -f $i.done ] && continue + patch -p1 < ../stuff/$i.u || return 1 + touch $i.done + done + ./configure --prefix=/usr --infodir=/usr/share/info \ + --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS && \ + make && make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/sbin $fs/etc + cp $_pkg/etc/dhcpd.conf $fs/etc + cp $_pkg/usr/sbin/dhcpd $fs/usr/sbin + # Package all dhcp pkgs + for i in $(cd $WOK; ls -d dhcp-*) + do + tazwok genpkg $i + done +} + diff -r f21f0b5b51c2 -r bedf285c387c dhcp6/stuff/start-without-ipv6.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcp6/stuff/start-without-ipv6.u Thu Jun 11 17:11:41 2009 +0200 @@ -0,0 +1,49 @@ +--- dhcp-4.1.1b1/common/discover.c ++++ dhcp-4.1.1b1/common/discover.c +@@ -443,15 +443,17 @@ + } + + #ifdef DHCPv6 +- ifaces->fp6 = fopen("/proc/net/if_inet6", "r"); +- if (ifaces->fp6 == NULL) { +- log_error("Error opening '/proc/net/if_inet6' to " +- "list IPv6 interfaces; %m"); +- close(ifaces->sock); +- ifaces->sock = -1; +- fclose(ifaces->fp); +- ifaces->fp = NULL; +- return 0; ++ if (local_family == AF_INET6) { ++ ifaces->fp6 = fopen("/proc/net/if_inet6", "r"); ++ if (ifaces->fp6 == NULL) { ++ log_error("Error opening '/proc/net/if_inet6' to " ++ "list IPv6 interfaces; %m"); ++ close(ifaces->sock); ++ ifaces->sock = -1; ++ fclose(ifaces->fp); ++ ifaces->fp = NULL; ++ return 0; ++ } + } + #endif + +@@ -720,7 +722,8 @@ + } + #ifdef DHCPv6 + if (!(*err)) { +- return next_iface6(info, err, ifaces); ++ if (local_family == AF_INET6) ++ return next_iface6(info, err, ifaces); + } + #endif + return 0; +@@ -736,7 +739,8 @@ + close(ifaces->sock); + ifaces->sock = -1; + #ifdef DHCPv6 +- fclose(ifaces->fp6); ++ if (local_family == AF_INET6) ++ fclose(ifaces->fp6); + ifaces->fp6 = NULL; + #endif + }