Commit ed371946 authored by Vitaly Lipatov's avatar Vitaly Lipatov

allow run rpmU under root user

parent 2a752255
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# Author: Vitaly Lipatov <lav@etersoft.ru> # Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain # Public domain
ALLOW_ROOT_USER=1
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod gettext load_mod gettext
......
...@@ -91,12 +91,10 @@ is_gear() ...@@ -91,12 +91,10 @@ is_gear()
return 1 return 1
} }
if [ "$UID" = "0" ] && [ -z "$ALLOW_ROOT_USER" ] ; then
if [ "$UID" = "0" ] ; then
fatal "It is strict recommended do not use these scripts as root" fatal "It is strict recommended do not use these scripts as root"
fi fi
load_mod() load_mod()
{ {
local i local i
...@@ -107,6 +105,7 @@ load_mod() ...@@ -107,6 +105,7 @@ load_mod()
load_mod config gettext alt spec strings load_mod config gettext alt spec strings
# check for needed version # check for needed version
if [ -n "$NEEDETERBUILD" ] ; then if [ -n "$NEEDETERBUILD" ] ; then
if [ "$NEEDETERBUILD" -gt "$ETERBUILDVERSION" ] ; then if [ "$NEEDETERBUILD" -gt "$ETERBUILDVERSION" ] ; then
......
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