Commit 29b362df authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm prescription common.sh: add is_root, assure_root

parent 14a63010
......@@ -6,6 +6,18 @@ fatal()
exit 1
}
is_root()
{
local EFFUID="$(id -u)"
[ "$EFFUID" = "0" ]
}
assure_root()
{
is_root || fatal "run me only under root"
}
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
......
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