Commit 31c15072 authored by Vitaly Lipatov's avatar Vitaly Lipatov

set_sudo: print fatal error if needed absent sudo

parent 2161f608
......@@ -128,10 +128,12 @@ fatal()
set_sudo()
{
# set SUDO not for root user
SUDO="sudo"
[ -n "$UID" ] || UID=`id -u`
if [ $UID = "0" ]; then
SUDO=""
else
SUDO="fatal 'Can't find sudo. Please install sudo or run epm under root.'"
which sudo >/dev/null 2>/dev/null && SUDO="sudo"
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment