Add sbin paths for hypervisor tool detection on non-root users
This commit is contained in:
@@ -196,6 +196,9 @@ gather_container_stats() {
|
||||
[ -n "$uptime_s" ] && echo "uptime_seconds=$uptime_s"
|
||||
}
|
||||
|
||||
# Ensure sbin paths are available (not always in PATH for non-root users)
|
||||
export PATH="$PATH:/usr/sbin:/usr/local/sbin:/sbin"
|
||||
|
||||
# Use sudo if available and needed (infmap user won't have direct access)
|
||||
_sudo() {
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user