blob: 65d895703b7b3833e364c6bcabb935bf9958de9a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/sh
. /etc/local.d/vars.sh
# Not actually starting dhcpcd here, just writing out the configuration
# file based on what we have in vars
#
# This file also installs the `radvd.hook` to enable ipv6 router advertisements
# on the lan interface.
# Write out our dhcpcd conf, take note that I've specifically disabled ipv4
# here. I could enable it, however to keep a static ipv4 address the same as
# with a previous router it makes sense to have a DHCPv4 server not using a
# duid. ( So, udhcpc is still used )
cat > /etc/dhcpcd.conf <<EOF
duid
nodhcp
noipv4
noipv4ll
dhcp6
persistent
vendorclassid
option domain_name_servers, domain_name, domain_search
option classless_static_routes
option interface_mtu
option host_name
option rapid_commit
require dhcp_server_identifier
slaac private
noipv6rs
denyinterfaces $lan
interface $wan
ipv6rs
ia_na 1
ia_pd 2 $lan/0
EOF
echo "Generated dhcpcd.conf:"
cat /etc/dhcpcd.conf
# Copy the dhcpcd hook for radvd into place
cp /etc/local.d/radvd.hook \
/usr/lib/dhcpcd/dhcpcd-hooks/60-radvd.conf
. /etc/local.d/vars_end.sh
|