From a14580944bfe15603a2939cd2d11b11532a354b1 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 14 Nov 2020 11:57:01 +0100 Subject: [PATCH] bundles/{radvd,wide-dhcp6c}: improve handling of non-properly terminated ip-down scripts --- bundles/pppd/files/pppoe.service | 2 ++ bundles/radvd/files/ip-up | 7 ++++++- bundles/wide-dhcp6c/files/ip-up | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bundles/pppd/files/pppoe.service b/bundles/pppd/files/pppoe.service index bc0e7ba..30c5ef5 100644 --- a/bundles/pppd/files/pppoe.service +++ b/bundles/pppd/files/pppoe.service @@ -7,6 +7,8 @@ Type=oneshot RemainAfterExit=true ExecStart=/usr/bin/pon ExecStop=/usr/bin/poff -a +# This is important, because otherwise systemd will kill the ip-down scripts! +KillMode=none [Install] WantedBy=default.target diff --git a/bundles/radvd/files/ip-up b/bundles/radvd/files/ip-up index 8c91851..1292b93 100644 --- a/bundles/radvd/files/ip-up +++ b/bundles/radvd/files/ip-up @@ -1,3 +1,8 @@ #!/bin/bash -systemctl start radvd +if systemctl is-active wide-dhcpv6-client; +then + systemctl restart radvd +else + systemctl start radvd +fi diff --git a/bundles/wide-dhcp6c/files/ip-up b/bundles/wide-dhcp6c/files/ip-up index ee8bc91..2440f05 100644 --- a/bundles/wide-dhcp6c/files/ip-up +++ b/bundles/wide-dhcp6c/files/ip-up @@ -8,4 +8,9 @@ then exit 0 fi -systemctl start wide-dhcpv6-client +if systemctl is-active wide-dhcpv6-client; +then + systemctl restart wide-dhcpv6-client +else + systemctl start wide-dhcpv6-client +fi