From b703a9f1695c1bd1bcb95f5714f41b0cafd32b8d Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Tue, 10 Apr 2007 00:32:16 +0000 Subject: [PATCH] Stefan Fiedler: sysfiles: rename the EUID variable to _EUID bash already defines a read-only variable for the same purpose [2007041002262826823] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8322 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/sysfiles/etc_profile.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/base/sysfiles/etc_profile.txt b/package/base/sysfiles/etc_profile.txt index d3e7012b7..9e7f6c098 100644 --- a/package/base/sysfiles/etc_profile.txt +++ b/package/base/sysfiles/etc_profile.txt @@ -21,7 +21,8 @@ # --- ROCK-COPYRIGHT-NOTE-END --- # determine the effective user id -EUID="$( id -u )" +# note that bash defines EUID as a read-only variable for this purpose +_EUID="$( id -u )" # set the PATH-variable export PATH="" @@ -31,7 +32,7 @@ do if [ -d "$_bindir" ]; then PATH="$PATH${PATH:+:}$_bindir" fi - if [ -w / -o "$EUID" == 0 ]; then + if [ -w / -o "$_EUID" == 0 ]; then _sbindir=${_bindir/%\/bin/\/sbin} if [ "$_bindir" != "$_sbindir" -a -d "$_sbindir" ]; then PATH="$PATH${PATH:+:}$_sbindir" @@ -98,4 +99,4 @@ for x in /etc/profile.d/* /etc/conf/profile ; do [ -f $x ] && . $x done -unset EUID x +unset _EUID x