["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only without password sudo is supported in non interactive using). Please run epm under root.'"
["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only passwordless sudo is supported in non interactive using). Please run epm under root.'"
return"$SUDO_TESTED"
fi
else
# use sudo if one is tuned and tuned without password
if!$SUDO_CMD-l-n>/dev/null 2>/dev/null ;then
["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only without password sudo is supported). Please run epm under root or check http://altlinux.org/sudo.'"
["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only passwordless sudo is supported). Please run epm under root or check http://altlinux.org/sudo.'"
return"$SUDO_TESTED"
fi
fi
...
...
@@ -373,6 +373,11 @@ set_sudo()
}
sudo_allowed()
{
set_sudo nofail
}
withtimeout()
{
local TO=$(which timeout 2>/dev/null || which gtimeout 2>/dev/null)
["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only without password sudo is supported in non interactive using). Please run epm under root.'"
["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only passwordless sudo is supported in non interactive using). Please run epm under root.'"
return"$SUDO_TESTED"
fi
else
# use sudo if one is tuned and tuned without password
if!$SUDO_CMD-l-n>/dev/null 2>/dev/null ;then
["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only without password sudo is supported). Please run epm under root or check http://altlinux.org/sudo.'"
["$nofail"="nofail"]||SUDO="fatal 'Can't use sudo (only passwordless sudo is supported). Please run epm under root or check http://altlinux.org/sudo.'"
return"$SUDO_TESTED"
fi
fi
...
...
@@ -364,6 +364,11 @@ set_sudo()
}
sudo_allowed()
{
set_sudo nofail
}
withtimeout()
{
local TO=$(which timeout 2>/dev/null || which gtimeout 2>/dev/null)