diff --git a/script/_dhcpv6_pd_ref b/script/_dhcpv6_pd_ref index b431ce625da..946c22c7400 100644 --- a/script/_dhcpv6_pd_ref +++ b/script/_dhcpv6_pd_ref @@ -30,15 +30,65 @@ # This script manipulates DHCPv6-PD-REF configuration. # -customise_dhcpcd_conf() +# TODO: set the upstream interface according to the environment variables of `script/setup`. +UPSTREAM_INTERFACE="eth0" + +DHCPCD_ENTER_HOOK="/etc/dhcpcd.enter-hook" +DHCPCD_EXIT_HOOK="/etc/dhcpcd.exit-hook" + +PD_DAEMON_DIR="/opt/pd-daemon" +PD_DAEMON_PATH="${PD_DAEMON_DIR}/dhcp6_pd_daemon.py" +PD_DAEMON_SERVICE_NAME="dhcp6_pd_daemon.service" +PD_DAEMON_SERVICE_PATH="/etc/systemd/system/${PD_DAEMON_SERVICE_NAME}" + +DHCP_CONFIG_PATH="/etc/dhcpcd.conf" +DHCP_CONFIG_ORIG_PATH="/etc/dhcpcd.conf.orig" +DHCP_CONFIG_PD_PATH="/etc/dhcpcd.conf.pd" +DHCP_CONFIG_NO_PD_PATH="/etc/dhcpcd.conf.no-pd" + +# Create dhcpcd configuration file with ipv6 prefix request. +create_dhcpcd_conf_pd() { - # This has to be run after script/_border_routing, and this will - # invalidate all changes to dhcpcd.conf made by script/_border_routing. - sudo tee /etc/dhcpcd.conf >/dev/null </dev/null </dev/null <