diff options
author | Craig Leres <leres@FreeBSD.org> | 2018-08-16 01:26:36 +0000 |
---|---|---|
committer | Craig Leres <leres@FreeBSD.org> | 2018-08-16 01:26:36 +0000 |
commit | 2a7375b5d65e285ca7e24623e48414b49a41eaab (patch) | |
tree | b4885674fae732b99f47caec4c4dfdf81aaf5196 /net | |
parent | 4dd2b7b3e8db8f63f2bd42b428553a68f2fd6dbe (diff) | |
download | ports-2a7375b5d65e285ca7e24623e48414b49a41eaab.tar.gz ports-2a7375b5d65e285ca7e24623e48414b49a41eaab.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/dhcp6/Makefile | 1 | ||||
-rw-r--r-- | net/dhcp6/files/dhcp6c.in | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/net/dhcp6/Makefile b/net/dhcp6/Makefile index 112ce8c1b4bb..5ab4596d3c0a 100644 --- a/net/dhcp6/Makefile +++ b/net/dhcp6/Makefile @@ -4,6 +4,7 @@ PORTNAME= dhcp6 PORTVERSION= 20080615.2 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= net ipv6 MAINTAINER= hrs@FreeBSD.org diff --git a/net/dhcp6/files/dhcp6c.in b/net/dhcp6/files/dhcp6c.in index 6a8649b1a9d5..4cec6989d571 100644 --- a/net/dhcp6/files/dhcp6c.in +++ b/net/dhcp6/files/dhcp6c.in @@ -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}" @@ -47,6 +50,10 @@ dhcp6c_precmd() 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 } run_rc_command "$1" |