summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-03-23 22:47:19 +0000
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-03-23 23:04:18 +0000
commit8f39784c847801c0b766a0c9289da0976ffd0604 (patch)
treef99c84bbf2a78aa3e9278f276a18336cad047520 /src/conf_mode
parent71561a27a0338cba7c54ea8ae9bf14b75006ddbd (diff)
downloadvyos-1x-8f39784c847801c0b766a0c9289da0976ffd0604.tar.gz
vyos-1x-8f39784c847801c0b766a0c9289da0976ffd0604.zip
ifconfig: T2154: fixing failure to start-stop-daemon
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-openvpn.py10
-rwxr-xr-xsrc/conf_mode/interfaces-wireless.py10
-rwxr-xr-xsrc/conf_mode/vpn_sstp.py10
3 files changed, 24 insertions, 6 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py
index 463ae9fd7..3a3c69e37 100755
--- a/src/conf_mode/interfaces-openvpn.py
+++ b/src/conf_mode/interfaces-openvpn.py
@@ -958,7 +958,10 @@ def apply(openvpn):
# service as the configuration is not re-read. Stop daemon only if it's
# running - it could have died or killed by someone evil
if pid_exists(pid):
- cmd = 'start-stop-daemon --stop --quiet'
+ cmd = 'start-stop-daemon'
+ cmd += ' --stop '
+ cmd += ' --quiet'
+ cmd += ' --oknodo'
cmd += ' --pidfile ' + pidfile
subprocess_cmd(cmd)
@@ -990,7 +993,10 @@ def apply(openvpn):
# No matching OpenVPN process running - maybe it got killed or none
# existed - nevertheless, spawn new OpenVPN process
- cmd = 'start-stop-daemon --start --quiet'
+ cmd = 'start-stop-daemon'
+ cmd += ' --start '
+ cmd += ' --quiet'
+ cmd += ' --oknodo'
cmd += ' --pidfile ' + pidfile
cmd += ' --exec /usr/sbin/openvpn'
# now pass arguments to openvpn binary
diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py
index 54299b609..43455196c 100755
--- a/src/conf_mode/interfaces-wireless.py
+++ b/src/conf_mode/interfaces-wireless.py
@@ -1353,7 +1353,10 @@ def generate(wifi):
pid = int(f.read())
if pid_exists(pid):
- cmd = 'start-stop-daemon --stop --quiet'
+ cmd = 'start-stop-daemon'
+ cmd += ' --stop '
+ cmd += ' --quiet'
+ cmd += ' --oknodo'
cmd += ' --pidfile ' + pidfile
subprocess_cmd(cmd)
@@ -1365,7 +1368,10 @@ def generate(wifi):
pid = int(f.read())
if pid_exists(pid):
- cmd = 'start-stop-daemon --stop --quiet'
+ cmd = 'start-stop-daemon'
+ cmd += ' --stop '
+ cmd += ' --quiet'
+ cmd += ' --oknodo'
cmd += ' --pidfile ' + pidfile
subprocess_cmd(cmd)
diff --git a/src/conf_mode/vpn_sstp.py b/src/conf_mode/vpn_sstp.py
index 8583ece74..8e5c7587c 100755
--- a/src/conf_mode/vpn_sstp.py
+++ b/src/conf_mode/vpn_sstp.py
@@ -497,7 +497,10 @@ def apply(sstp):
if sstp is None:
if pid_exists(pid):
- cmd = 'start-stop-daemon --stop --quiet'
+ cmd = 'start-stop-daemon'
+ cmd += ' --stop '
+ cmd += ' --quiet'
+ cmd += ' --oknodo'
cmd += ' --pidfile ' + pidfile
subprocess_cmd(cmd)
@@ -510,7 +513,10 @@ def apply(sstp):
if os.path.exists(pidfile):
os.remove(pidfile)
- cmd = 'start-stop-daemon --start --quiet'
+ cmd = 'start-stop-daemon'
+ cmd += ' --start '
+ cmd += ' --quiet'
+ cmd += ' --oknodo'
cmd += ' --pidfile ' + pidfile
cmd += ' --exec /usr/sbin/accel-pppd'
# now pass arguments to accel-pppd binary