From 583a45fd02fa6f0328a2bed17d28da724c6fdf2c Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 13 Apr 2025 07:18:23 +0200 Subject: netplug: T7353: define proper systemd service Netplug daemon is started last after all interfaces got initialized to properly monitor them for up/down events --- src/init/vyos-router | 5 ++++- src/systemd/netplug.service | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/systemd/netplug.service (limited to 'src') diff --git a/src/init/vyos-router b/src/init/vyos-router index ab3cc42cb..96957be7c 100755 --- a/src/init/vyos-router +++ b/src/init/vyos-router @@ -557,6 +557,9 @@ start () if [[ ! -z "$tmp" ]]; then vtysh -c "rpki start" fi + + # Start netplug daemon + systemctl start netplug.service } stop() @@ -574,8 +577,8 @@ stop() umount ${vyatta_configdir} log_action_end_msg $? + systemctl stop netplug.service systemctl stop vyconfd.service - systemctl stop frr.service unmount_encrypted_config diff --git a/src/systemd/netplug.service b/src/systemd/netplug.service new file mode 100644 index 000000000..928c553e8 --- /dev/null +++ b/src/systemd/netplug.service @@ -0,0 +1,9 @@ +[Unit] +Description=Network cable hotplug management daemon +Documentation=man:netplugd(8) +After=vyos-router.service + +[Service] +Type=forking +PIDFile=/run/netplugd.pid +ExecStart=/sbin/netplugd -c /etc/netplug/netplugd.conf -p /run/netplugd.pid -- cgit v1.2.3