summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/core4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/core b/lib/core
index f6516b5e..6d126142 100644
--- a/lib/core
+++ b/lib/core
@@ -5,7 +5,9 @@ msg() { printf "$@\n" >&2 ;}
info() { msg "** $@" ;}
error() { msg "!! $@" ;}
exists(){ type "$1" >/dev/null 2>/dev/null; }
-
+is_root(){
+ test $(id -u) -eq 0
+}
get_hostname(){
# finds the current hostname
# if ENV HOSTN is set echo $HOSTN