From 7c27ad6480d99e7bd10e8ccb3c0a80d485d955ef Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 12 Apr 2020 14:13:53 +0200 Subject: dhcp-server: T2185: fixup ConditionPathExists variable Commit bc68244 ("dhcp-server: T2185: migrate from SysVinit to systemd") migrated the DHCP subsystem to systemd, but on the test-system there was still the old configuration file present not triggering this condition. --- src/conf_mode/dhcp_server.py | 4 ++-- src/systemd/isc-dhcp-server.service | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conf_mode/dhcp_server.py b/src/conf_mode/dhcp_server.py index 59de9913c..aaa5ad3b3 100755 --- a/src/conf_mode/dhcp_server.py +++ b/src/conf_mode/dhcp_server.py @@ -607,11 +607,11 @@ def generate(dhcp): def apply(dhcp): if not dhcp or dhcp['disabled']: # DHCP server is removed in the commit - call('sudo systemctl stop isc-dhcp-server.service') + call('systemctl stop isc-dhcp-server.service') if os.path.exists(config_file): os.unlink(config_file) - call('sudo systemctl restart isc-dhcp-server.service') + call('systemctl restart isc-dhcp-server.service') return None if __name__ == '__main__': diff --git a/src/systemd/isc-dhcp-server.service b/src/systemd/isc-dhcp-server.service index 7d49b2c37..39a97fb4e 100644 --- a/src/systemd/isc-dhcp-server.service +++ b/src/systemd/isc-dhcp-server.service @@ -4,7 +4,7 @@ Documentation=man:dhcpd(8) After=vyos-router.service RequiresMountsFor=/run After=time-sync.target -ConditionPathExists=/etc/dhcp/dhcpd.conf +ConditionPathExists=/run/dhcp-server/dhcpd.conf [Service] -- cgit v1.2.3