Add sbin directories to PATH when root

darcs-hash:20051220090155-ac50b-2a0a54dda98086cae3329dc31a71f28774bddf46.gz
This commit is contained in:
axel 2005-12-20 19:01:55 +10:00
parent cdbd233e62
commit 00778832f1

View File

@ -15,7 +15,14 @@ set -g IFS \ \t\n
# want this even for text-only terminals.
#
for i in /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin
set -l path_list /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin
set -l uid (id -u 2>/dev/null)
if test "$uid" = 0
set path_list $path_list /sbin /usr/sbin /usr/local/sbin
end
for i in $path_list
if not expr "$PATH" : .\*$i.\* >/dev/null
if test -d $i
set PATH $PATH $i
@ -24,6 +31,8 @@ for i in /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin
end
#
# Set some value for LANG if nothing was set before
#