aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh/level3.sh
diff options
context:
space:
mode:
authorFlorin Grad <florin@mandriva.com>2001-09-27 15:21:03 +0000
committerFlorin Grad <florin@mandriva.com>2001-09-27 15:21:03 +0000
commit49eb2b0dc03c2e21426066c38c56f10881c7d7ac (patch)
tree89fb71927d702ff081afe1ae85c856c05f7dab14 /init-sh/level3.sh
parentc42599db26b2eeed5ba370ebec29ff653ac6c90f (diff)
downloadmsec-49eb2b0dc03c2e21426066c38c56f10881c7d7ac.tar
msec-49eb2b0dc03c2e21426066c38c56f10881c7d7ac.tar.gz
msec-49eb2b0dc03c2e21426066c38c56f10881c7d7ac.tar.bz2
msec-49eb2b0dc03c2e21426066c38c56f10881c7d7ac.tar.xz
msec-49eb2b0dc03c2e21426066c38c56f10881c7d7ac.zip
move from profile ro the profile.d/msec.{sh,csh} entries
Diffstat (limited to 'init-sh/level3.sh')
-rwxr-xr-xinit-sh/level3.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/init-sh/level3.sh b/init-sh/level3.sh
index 6ef9549..95980ed 100755
--- a/init-sh/level3.sh
+++ b/init-sh/level3.sh
@@ -79,17 +79,13 @@ AddRules "umask 022" /etc/profile.d/msec.sh
AddRules "umask 022" /etc/profile.d/msec.csh
echo "Adding \"non secure\" PATH variable :"
-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/games" /etc/profile.d/msec.sh quiet
- AddRules "setenv PATH \"\${PATH}:/usr/games\"" /etc/profile.d/msec.csh quiet
-fi
+AddRules "if ! echo \${PATH} |grep -q /usr/X11R6/bin ; then\n\texport PATH=\$PATH:/usr/X11R6/bin\nfi" /etc/profile.d/msec.sh quiet
+AddRules "if ! { (echo "\${PATH}" | grep -q /usr/X11R6/bin) } then\n\tsetenv PATH \"\${PATH}:/usr/X11R6/bin\"\nendif" /etc/profile.d/msec.csh quiet
+AddRules "if ! echo \${PATH} |grep -q /usr/games ; then\n\texport PATH=\$PATH:/usr/games\nfi" /etc/profile.d/msec.sh quiet
+AddRules "if ! { (echo "\${PATH}" | grep -q /usr/games) } then\n\tsetenv PATH \"\${PATH}:/usr/games\"\nendif" /etc/profile.d/msec.csh quiet
-AddRules "export PATH=\$PATH:." /etc/profile.d/msec.sh quiet
-AddRules "setenv PATH \"\${PATH}:.\"" /etc/profile.d/msec.csh quiet
+AddRules "if ! echo \${PATH} |grep -q :. ; then\n\texport PATH=\$PATH:.\nfi" /etc/profile.d/msec.sh quiet
+AddRules "if ! { (echo "\${PATH}" | grep -q :.) } then\n\tsetenv PATH \"\${PATH}:.\"\nendif" /etc/profile.d/msec.csh quiet
# Do not boot on a shell
AllowReboot