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