summaryrefslogtreecommitdiff
path: root/01_Functions.zsh
diff options
context:
space:
mode:
authorhugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913>2007-05-17 22:38:43 +0000
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:12 +0100
commitdee8d4941f20710617465270d86eacd53e2643fb (patch)
treef0c693205ae726b0aba408460a43e5aaa3ae232f /01_Functions.zsh
parent39a44a361c8551a0be48a59fdbf7fa86a29a6d89 (diff)
Correctifs apportés suite à la mise à jour sur Prunelle (Darwin)
git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@386 a0e5b806-a6f9-0310-978d-cbce73f8a913
Diffstat (limited to '01_Functions.zsh')
-rw-r--r--01_Functions.zsh9
1 files changed, 7 insertions, 2 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh
index 9769e9a..4a0fcb7 100644
--- a/01_Functions.zsh
+++ b/01_Functions.zsh
@@ -49,8 +49,13 @@ cmd_exists ()
normal_user ()
{
- eval `grep -v '^[$#]' /etc/login.defs | grep "^UID_" | tr -d '[:blank:]' | sed 's/^[A-Z_]\+/&=/'`
- test \( $UID -ge $UID_MIN \) -a \( $UID -le $UID_MAX \)
+ if test -e /etc/login.defs
+ then
+ eval `grep -v '^[$#]' /etc/login.defs | grep "^UID_" | tr -d '[:blank:]' | sed 's/^[A-Z_]\+/&=/'`
+ test \( $UID -ge $UID_MIN \) -a \( $UID -le $UID_MAX \)
+ else
+ [ "`whoami`" != "root" ]
+ fi
}
privileged_user ()