summaryrefslogtreecommitdiff
path: root/src/conf_mode/dhcp_server.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-12 14:13:53 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-12 21:34:57 +0200
commit7c27ad6480d99e7bd10e8ccb3c0a80d485d955ef (patch)
treec2d3515e0a30924eef84afb63216531e562c4d6c /src/conf_mode/dhcp_server.py
parentf371946044696737d1649d9119665b96430d2328 (diff)
downloadvyos-1x-7c27ad6480d99e7bd10e8ccb3c0a80d485d955ef.tar.gz
vyos-1x-7c27ad6480d99e7bd10e8ccb3c0a80d485d955ef.zip
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.
Diffstat (limited to 'src/conf_mode/dhcp_server.py')
-rwxr-xr-xsrc/conf_mode/dhcp_server.py4
1 files changed, 2 insertions, 2 deletions
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__':