summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-03-13 15:50:34 +0100
committerTom Gundersen <teg@jklm.no>2012-03-13 15:50:34 +0100
commitb49cc7be1be791318f57d2941999368ae58636b7 (patch)
tree43393eacaa669a4ff09eff9d1fd867c1c089cec1 /functions
parentcb18be3f401a2c693d66a9417e479ed74e17c2f0 (diff)
parent9f75591c8a56ba7ec1ea20cfe16dd10a83c65503 (diff)
Merge remote-tracking branch 'seblu/master'
Conflicts: Makefile
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: