From b76931e6d3a4bd0cdb74ca447a746ab6855fcf55 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 18 May 2021 19:13:34 +0200 Subject: revert: "util: T2467: add autosudo as an option to command" Implementing a wrapper which will - based on the command - add a sudo prefix to the execution string seemed to be a nice idea but unfortunately it did not only not get momentum but also the codebase somethis added an implicit "sudo" call a second time. This resulted in a call: "sudo sudo systemctl" The entire functionality was removed again and if an op-mode script requires root priviledges it must be explicitly called with them - no black magic. --- op-mode-definitions/conntrack-sync.xml.in | 18 +++++++++--------- op-mode-definitions/flow-accounting-op.xml.in | 2 +- op-mode-definitions/generate-ssh-server-key.xml.in | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/conntrack-sync.xml.in b/op-mode-definitions/conntrack-sync.xml.in index d1d3bf744..41a71b04a 100644 --- a/op-mode-definitions/conntrack-sync.xml.in +++ b/op-mode-definitions/conntrack-sync.xml.in @@ -11,13 +11,13 @@ Reset external cache and request resync with other systems - ${vyos_op_scripts_dir}/conntrack_sync.py --reset-cache-external + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --reset-cache-external Reset internal cache and request resync with other systems - ${vyos_op_scripts_dir}/conntrack_sync.py --reset-cache-internal + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --reset-cache-internal @@ -29,7 +29,7 @@ Restart connection tracking synchronization service - ${vyos_op_scripts_dir}/conntrack_sync.py --restart + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --restart @@ -49,19 +49,19 @@ Show external connection tracking cache entries - ${vyos_op_scripts_dir}/conntrack_sync.py --show-external; ${vyos_op_scripts_dir}/conntrack_sync.py --show-external-expect + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --show-external; ${vyos_op_scripts_dir}/conntrack_sync.py --show-external-expect Show external main connection tracking cache entries - ${vyos_op_scripts_dir}/conntrack_sync.py --show-external + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --show-external Show external expect connection tracking cache entries - ${vyos_op_scripts_dir}/conntrack_sync.py --show-external-expect + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --show-external-expect @@ -69,19 +69,19 @@ Show internal connection tracking cache entries - ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal; ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal-expect + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal; ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal-expect Show internal main connection tracking cache entries - ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal Show internal expect connection tracking cache entries - ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal-expect + sudo ${vyos_op_scripts_dir}/conntrack_sync.py --show-internal-expect diff --git a/op-mode-definitions/flow-accounting-op.xml.in b/op-mode-definitions/flow-accounting-op.xml.in index b847338f9..7aaae5974 100644 --- a/op-mode-definitions/flow-accounting-op.xml.in +++ b/op-mode-definitions/flow-accounting-op.xml.in @@ -57,7 +57,7 @@ Restart (net)flow accounting process - ${vyos_op_scripts_dir}/flow_accounting_op.py --action restart + sudo ${vyos_op_scripts_dir}/flow_accounting_op.py --action restart diff --git a/op-mode-definitions/generate-ssh-server-key.xml.in b/op-mode-definitions/generate-ssh-server-key.xml.in index 86bb1b1bd..ecea3e5d1 100644 --- a/op-mode-definitions/generate-ssh-server-key.xml.in +++ b/op-mode-definitions/generate-ssh-server-key.xml.in @@ -14,7 +14,7 @@ Re-generate SSH host keys and restart SSH server - ${vyos_op_scripts_dir}/generate_ssh_server_key.py + sudo ${vyos_op_scripts_dir}/generate_ssh_server_key.py -- cgit v1.2.3