feat(services-restart): which services still run replaced code, as root (NetOrk/netork#2700)
LinuxProcessReadingsMixin carries napalm-device-types' ServicesRestartMixin: its command goes through the driver's sudo like the listening sockets, and there is no unprivileged retry, since a reading of the login user's own processes would read as clean.
This commit is contained in:
1 parent
dfe084c4ad
commit
4268edc7a7
5 files changed
+69
-6
No files matched your search
@@ -98,6 +98,10 @@ _CALLERS = {
|
||||
lambda d: d._run_listening_sockets_command("sh -c 'ss -H -ltn'", privileged=True),
|
||||
[""],
|
||||
),
|
||||
"services restart": (
|
||||
lambda d: d._run_services_restart_command("sh -c 'needrestart -b -r l'"),
|
||||
[""],
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user