aboutsummaryrefslogtreecommitdiffstats
path: root/msec.csh
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2001-12-02 05:56:25 +0000
committerFrederic Lepied <flepied@mandriva.com>2001-12-02 05:56:25 +0000
commit3c6dd3c3f928438464518fe0fea1ad9e4d5411a0 (patch)
tree43f364c72a449ea976768951d99ecbdab37a4201 /msec.csh
parenteee1d3bbe23cd1c8fbd04185cb78104a2c562602 (diff)
downloadmsec-3c6dd3c3f928438464518fe0fea1ad9e4d5411a0.tar
msec-3c6dd3c3f928438464518fe0fea1ad9e4d5411a0.tar.gz
msec-3c6dd3c3f928438464518fe0fea1ad9e4d5411a0.tar.bz2
msec-3c6dd3c3f928438464518fe0fea1ad9e4d5411a0.tar.xz
msec-3c6dd3c3f928438464518fe0fea1ad9e4d5411a0.zip
sed black magic to read /etc/sysconfig/msec and translate sh variables
in csh ones.
Diffstat (limited to 'msec.csh')
-rwxr-xr-xmsec.csh13
1 files changed, 12 insertions, 1 deletions
diff --git a/msec.csh b/msec.csh
index 7552cee..e88eda7 100755
--- a/msec.csh
+++ b/msec.csh
@@ -1,4 +1,6 @@
-. /etc/sysconfig.msec
+if ( -r /etc/sysconfig/msec ) then
+ eval `sed -n 's/^\([^#]*\)=\([^#]*\)/set \1=\2;/p' < /etc/sysconfig/msec`
+endif
if ! { (echo "${PATH}" | grep -q /usr/X11R6/bin) } then
setenv PATH "${PATH}:/usr/X11R6/bin"
@@ -8,4 +10,13 @@ if ! { (echo "${PATH}" | grep -q /usr/games) } then
setenv PATH "${PATH}:/usr/games"
endif
+# translate sh variables from /etc/sysconfig/msec to their equivalent in csh
+if ( -n "$TMOUT" ) then
+ set autologout=`expr $TMOUT / 60`
+endif
+
+if ( -n "$HISTFILESIZE" ) then
+ set history=$HISTFILESIZE
+endif
+
setenv SECURE_LEVEL ${SECURE_LEVEL}