Date: Thu, 16 Aug 2018 01:26:37 +0000 (UTC) From: Craig Leres <leres@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r477305 - in head/net/dhcp6: . files Message-ID: <201808160126.w7G1Qbfv011380@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: leres Date: Thu Aug 16 01:26:36 2018 New Revision: 477305 URL: https://svnweb.freebsd.org/changeset/ports/477305 Log: Apparently starting with version 20080615.2 dhcp6c refuses to run without a dhcp6cctlkey file. Use openssl to generate one from the rc.d script when it is missing. PR: 229400 Reviewed by: ler (mentor) Approved by: maintainer timeout (6 weeks), ler (mentor) Differential Revision: https://reviews.freebsd.org/D16739 Modified: head/net/dhcp6/Makefile head/net/dhcp6/files/dhcp6c.in Modified: head/net/dhcp6/Makefile ============================================================================== --- head/net/dhcp6/Makefile Thu Aug 16 01:06:56 2018 (r477304) +++ head/net/dhcp6/Makefile Thu Aug 16 01:26:36 2018 (r477305) @@ -4,6 +4,7 @@ PORTNAME= dhcp6 PORTVERSION= 20080615.2 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= net ipv6 MAINTAINER= hrs@FreeBSD.org Modified: head/net/dhcp6/files/dhcp6c.in ============================================================================== --- head/net/dhcp6/files/dhcp6c.in Thu Aug 16 01:06:56 2018 (r477304) +++ head/net/dhcp6/files/dhcp6c.in Thu Aug 16 01:26:36 2018 (r477305) @@ -16,6 +16,8 @@ # Set it to YES to enable dhcp6c. # dhcp6c_config (path): Set to %%PREFIX%%/etc/dhcp6c.conf # by default. +# dhcp6c_dhcp6cctlkey (path): Set to %%PREFIX%%/etc/dhcp6cctlkey +# by default. # dhcp6c_pidfile (path): Set to /var/run/dhcp6c.pid # by default. # dhcp6c_interfaces (NIC list): Not defined by default. @@ -35,6 +37,7 @@ load_rc_config $name : ${dhcp6c_enable="NO"} : ${dhcp6c_config="%%PREFIX%%/etc/${name}.conf"} +: ${dhcp6c_dhcp6cctlkey="%%PREFIX%%/etc/dhcp6cctlkey"} : ${dhcp6c_pidfile="/var/run/${name}.pid"} required_files="${dhcp6c_config}" @@ -46,6 +49,10 @@ dhcp6c_precmd() if [ -z ${dhcp6c_interfaces} ]; then warn "dhcp6c_interfaces is not set." return 1 + fi + if [ ! -s ${dhcp6c_dhcp6cctlkey} ]; then + echo "Creating ${dhcp6c_dhcp6cctlkey}" + (umask 077 ; openssl rand -base64 48 > ${dhcp6c_dhcp6cctlkey}) fi }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808160126.w7G1Qbfv011380>