From dfa3c733dc6190ed2915032573dcdcb6e344ebd1 Mon Sep 17 00:00:00 2001 From: Yang Song Date: Thu, 31 Oct 2024 07:48:53 +0000 Subject: [PATCH] Add pd daemon service: using systemd to run pd daemon service --- script/_dhcpv6_pd_ref | 70 +++++++++++++++++++--- script/reference-device/dhcp6_pd_daemon.py | 59 +++++++++++------- 2 files changed, 100 insertions(+), 29 deletions(-) diff --git a/script/_dhcpv6_pd_ref b/script/_dhcpv6_pd_ref index b431ce625da..ab6069add9d 100644 --- a/script/_dhcpv6_pd_ref +++ b/script/_dhcpv6_pd_ref @@ -30,11 +30,17 @@ # This script manipulates DHCPv6-PD-REF configuration. # -customise_dhcpcd_conf() +DHCPCD_ENTER_HOOK="/etc/dhcpcd.enter-hook" +DHCPCD_EXIT_HOOK="/etc/dhcpcd.exit-hook" + +PD_DAEMON_PATH="/opt/pd-daemon" +PD_DAEMON="${PD_DAEMON_PATH}/dhcp6_pd_daemon.py" +PD_DAEMON_SERVICE_NAME="dhcp6_pd_daemon.service" +PD_DAEMON_SERVICE="/etc/systemd/system/${PD_DAEMON_SERVICE_NAME}" + +create_custom_dhcpcd_conf() { - # 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 <