diff options
author | Florin Grad <florin@mandriva.com> | 2001-09-27 15:21:03 +0000 |
---|---|---|
committer | Florin Grad <florin@mandriva.com> | 2001-09-27 15:21:03 +0000 |
commit | 49eb2b0dc03c2e21426066c38c56f10881c7d7ac (patch) | |
tree | 89fb71927d702ff081afe1ae85c856c05f7dab14 /init-sh | |
parent | c42599db26b2eeed5ba370ebec29ff653ac6c90f (diff) | |
download | msec-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')
-rwxr-xr-x | init-sh/level0.sh | 17 | ||||
-rwxr-xr-x | init-sh/level1.sh | 16 | ||||
-rwxr-xr-x | init-sh/level2.sh | 16 | ||||
-rwxr-xr-x | init-sh/level3.sh | 16 | ||||
-rwxr-xr-x | init-sh/level4.sh | 22 | ||||
-rwxr-xr-x | init-sh/level5.sh | 18 |
6 files changed, 39 insertions, 66 deletions
diff --git a/init-sh/level0.sh b/init-sh/level0.sh index 96bdc54..07c6126 100755 --- a/init-sh/level0.sh +++ b/init-sh/level0.sh @@ -70,18 +70,15 @@ echo "Setting umask to 022 (u=rw,g=r,o=r) :" 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 # Xserver echo "Allowing users to connect X server from everywhere :" diff --git a/init-sh/level1.sh b/init-sh/level1.sh index f8c5c43..14ce093 100755 --- a/init-sh/level1.sh +++ b/init-sh/level1.sh @@ -71,17 +71,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 # Xserver echo "Allowing users to connect X server from localhost :" diff --git a/init-sh/level2.sh b/init-sh/level2.sh index 4aa82fa..4387907 100755 --- a/init-sh/level2.sh +++ b/init-sh/level2.sh @@ -72,17 +72,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 # Xserver echo "Allowing users to connect X server from localhost :" 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 diff --git a/init-sh/level4.sh b/init-sh/level4.sh index 7e43d5b..1ef093b 100755 --- a/init-sh/level4.sh +++ b/init-sh/level4.sh @@ -110,20 +110,14 @@ echo "Setting umask to 022 (u=rw,g=rx) for root, 077 (u=rw) for user :" AddRules "if [[ \${UID} == 0 ]]; then umask 022; else umask 077; fi" /etc/profile.d/msec.sh AddRules "if [[ \${UID} == 0 ]]; then umask 022; else umask 077; fi" /etc/profile.d/msec.csh -echo "Adding \"non secure\" PATH variable :" -if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then - AddRules "export SECURE_LEVEL=4" /etc/profile.d/msec.sh quiet - AddRules "export PATH=\$PATH:/usr/X11R6/bin" /etc/profile.d/msec.sh quiet - AddRules "setenv SECURE_LEVEL 4" /etc/profile.d/msec.csh 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 "export PATH=\$PATH:." /etc/profile.d/msec.sh quiet -AddRules "setenv PATH \"\${PATH}:.\"" /etc/profile.d/msec.csh quiet +echo "Adding \"normal\" PATH variable :" +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 "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 if [[ -f /lib/libsafe.so.1.3 ]]; then echo "Enabling stack overflow protection :" diff --git a/init-sh/level5.sh b/init-sh/level5.sh index 8d76380..394bd86 100755 --- a/init-sh/level5.sh +++ b/init-sh/level5.sh @@ -121,19 +121,13 @@ AddRules "umask 077" /etc/profile.d/msec.sh AddRules "umask 077" /etc/profile.d/msec.csh echo "Adding \"normal\" PATH variable :" -if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then - AddRules "export SECURE_LEVEL=5" /etc/profile.d/msec.sh quiet - AddRules "export PATH=\$PATH:/usr/X11R6/bin" /etc/profile.d/msec.sh quiet - AddRules "setenv SECURE_LEVEL 5" /etc/profile.d/msec.csh 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 if [[ -f /lib/libsafe.so.1.3 ]]; then echo "Enabling stack overflow protection :" |