Commit ce76f5ba authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: move sudo set to set_sudo func

parent 2a4e3524
......@@ -34,12 +34,7 @@ load_helper()
load_helper epm-sh-functions
# set SUDO not for root user
SUDO="sudo"
[ -n "$UID" ] || UID=`id -u`
if [ $UID = "0" ]; then
SUDO=""
fi
set_sudo
#############################
......
......@@ -69,6 +69,17 @@ fatal()
exit 1
}
set_sudo()
{
# set SUDO not for root user
SUDO="sudo"
[ -n "$UID" ] || UID=`id -u`
if [ $UID = "0" ]; then
SUDO=""
fi
}
# FIXME: detect if not recognized
set_pm_type()
{
......
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