aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh/level1.sh
diff options
context:
space:
mode:
authorFlorin Grad <florin@mandriva.com>2001-09-26 12:07:46 +0000
committerFlorin Grad <florin@mandriva.com>2001-09-26 12:07:46 +0000
commitbc59d0708578a8eec5b071b619595acf054510c0 (patch)
tree88a983f2a9a5c3ca264e42dbf39c0a297765bb50 /init-sh/level1.sh
parent454daee30b71b95d9fe9b05245c77af2180ad542 (diff)
downloadmsec-bc59d0708578a8eec5b071b619595acf054510c0.tar
msec-bc59d0708578a8eec5b071b619595acf054510c0.tar.gz
msec-bc59d0708578a8eec5b071b619595acf054510c0.tar.bz2
msec-bc59d0708578a8eec5b071b619595acf054510c0.tar.xz
msec-bc59d0708578a8eec5b071b619595acf054510c0.zip
use profile.d/* files instead of /etc/{z}profile
Diffstat (limited to 'init-sh/level1.sh')
-rwxr-xr-xinit-sh/level1.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/init-sh/level1.sh b/init-sh/level1.sh
index 629163d..13d6454 100755
--- a/init-sh/level1.sh
+++ b/init-sh/level1.sh
@@ -67,14 +67,21 @@ AddRules "export SECURE_LEVEL=1" /etc/profile.d/msec.sh
AddRules "setenv SECURE_LEVEL 1" /etc/profile.d/msec.csh
echo "Setting umask to 022 (u=rw,g=r,o=r) :"
-AddRules "umask 022" /etc/profile
-AddRules "umask 022" /etc/zprofile
+AddRules "umask 022" /etc/profile.d/msec.sh
+AddRules "umask 022" /etc/profile.d/msec.csh
echo "Adding \"non secure\" PATH variable :"
-AddRules "PATH=\$PATH:/usr/X11R6/bin:/usr/games:." /etc/profile quiet
-AddRules "export PATH" /etc/profile
-AddRules "PATH=\$PATH:/usr/X11R6/bin:/usr/games:." /etc/zprofile quiet
-AddRules "export PATH" /etc/zprofile
+if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then
+ AddRules "export PATH=\$PATH:/usr/X11R6/bin" /etc/profile.d/msec.sh quiet
+ AddRules "setenv PATH \"\${PATH}:/usr/X11R6/bin\"" /etc/profile.d/msec.csh quiet
+fi
+if ! echo ${PATH} |grep -q /usr/games ; then
+ AddRules "export PATH=\$PATH:/usr/X11R6/bin:/usr/games:." /etc/profile.d/msec.sh quiet
+ AddRules "setenv PATH \"\${PATH}:/usr/games\"" /etc/profile.d/msec.csh quiet
+fi
+
+AddRules "export PATH=\$PATH:." /etc/profile.d/msec.sh quiet
+AddRules "setenv PATH \"\${PATH}:.\"" /etc/profile.d/msec.csh quiet
# Xserver
echo "Allowing users to connect X server from localhost :"