From owner-svn-ports-head@freebsd.org Thu Aug 16 01:26:38 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A0B1107750F; Thu, 16 Aug 2018 01:26:38 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6E0887041; Thu, 16 Aug 2018 01:26:37 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8266212836; Thu, 16 Aug 2018 01:26:37 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7G1QbnW011381; Thu, 16 Aug 2018 01:26:37 GMT (envelope-from leres@FreeBSD.org) Received: (from leres@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7G1Qbfv011380; Thu, 16 Aug 2018 01:26:37 GMT (envelope-from leres@FreeBSD.org) Message-Id: <201808160126.w7G1Qbfv011380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leres set sender to leres@FreeBSD.org using -f From: Craig Leres Date: Thu, 16 Aug 2018 01:26:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r477305 - in head/net/dhcp6: . files X-SVN-Group: ports-head X-SVN-Commit-Author: leres X-SVN-Commit-Paths: in head/net/dhcp6: . files X-SVN-Commit-Revision: 477305 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 01:26:38 -0000 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 }