aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions10
1 files changed, 0 insertions, 10 deletions
diff --git a/functions b/functions
index 3593892..f8a7acd 100644
--- a/functions
+++ b/functions
@@ -651,15 +651,5 @@ for f in /etc/rc.d/functions.d/*; do
[[ -e $f ]] && . "$f"
done
-# Exit current shell if user is not root
-need_root() {
- (( EUID )) && printf 'You need to be root.\n' && exit 1
-}
-
-# Quit script if it's not running by root
-# This can be disabled in scripts sourcing functions by setting NEED_ROOT=0
-# A local call to need_root can be done to ensure part of script need root privilege
-(( NEED_ROOT )) && need_root
-
# End of file
# vim: set ts=2 sw=2 noet: