From cb5377199587ee4b1ce2d80211448db2afa6e0ec Mon Sep 17 00:00:00 2001 From: Yang Song Date: Tue, 5 Nov 2024 05:24:24 +0000 Subject: [PATCH] Add pd daemon service: bug fix --- script/_dhcpv6_pd_ref | 36 ++++++++++++++++------ script/reference-device/dhcp6_pd_daemon.py | 26 ++++++++-------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/script/_dhcpv6_pd_ref b/script/_dhcpv6_pd_ref index 9f03afc7513..a97211b710f 100644 --- a/script/_dhcpv6_pd_ref +++ b/script/_dhcpv6_pd_ref @@ -38,13 +38,32 @@ 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}" -create_pd_dhcpcd_conf() +DHCP_CONFIG_FILE="/etc/dhcpcd.conf.orig" +DHCP_CONFIG_ORIG_FILE="/etc/dhcpcd.conf.orig" +DHCP_CONFIG_WITH_PD_FILE="/etc/dhcpcd.conf.with-pd" +DHCP_CONFIG_NO_PD_FILE="/etc/dhcpcd.conf.no-pd" + +# Create dhcpcd configuration file with ipv6 prefix request. +create_dhcpcd_conf_with_pd() { - sudo tee /etc/dhcpcd.conf.pd >/dev/null </dev/null </dev/null <