remaster/src/func/check_user

14 lines
287 B
Plaintext
Raw Normal View History

#!/bin/bash
#remaster lib
2018-05-06 17:26:21 +00:00
[ -d "$LIBDIR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDIR"] || { echo "LIBDIR not exist"; exit 1; }
#check_user
function check_user() {
#check root
[ "`whoami`" == "root" ] || {
echo "### ERROR ### Remaster need ROOT permision!"
return 10
}
}