From: chase Date: Tue, 24 Apr 2018 02:49:30 +0000 (-0700) Subject: Rewrite csh scripts in sh, use sh instead of csh in scripts X-Git-Tag: 2.2.4a~59 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00fc1c54c1f8079a99ac8770b91ea33cc61720c5;p=oweals%2Fcde.git Rewrite csh scripts in sh, use sh instead of csh in scripts --- diff --git a/cde/admin/IntegTools/post_install/dec/configMin.src b/cde/admin/IntegTools/post_install/dec/configMin.src index 0dd018c3..05e52baf 100644 --- a/cde/admin/IntegTools/post_install/dec/configMin.src +++ b/cde/admin/IntegTools/post_install/dec/configMin.src @@ -227,7 +227,7 @@ XCOMM ############################################################### ps -ef | grep inetd | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] then - awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh + awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh else /usr/sbin/inetd -s fi diff --git a/cde/admin/IntegTools/post_install/dec/configRun.src b/cde/admin/IntegTools/post_install/dec/configRun.src index 24ac0a31..bfe08b6f 100644 --- a/cde/admin/IntegTools/post_install/dec/configRun.src +++ b/cde/admin/IntegTools/post_install/dec/configRun.src @@ -429,7 +429,7 @@ DEFAULT_PRINTER="DtPrint" ps -ef | grep inetd | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] then - awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh + awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh else /usr/sbin/inetd -s fi diff --git a/cde/admin/IntegTools/post_install/dec/configTT.src b/cde/admin/IntegTools/post_install/dec/configTT.src index 34afb6a5..d432e32d 100644 --- a/cde/admin/IntegTools/post_install/dec/configTT.src +++ b/cde/admin/IntegTools/post_install/dec/configTT.src @@ -228,7 +228,7 @@ XCOMM ###################################################################### ps -ef | grep inetd | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] then - awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh + awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh else /usr/sbin/inetd -s fi diff --git a/cde/admin/IntegTools/post_install/sun/configMin.src b/cde/admin/IntegTools/post_install/sun/configMin.src index 41bb9d0e..6084980d 100755 --- a/cde/admin/IntegTools/post_install/sun/configMin.src +++ b/cde/admin/IntegTools/post_install/sun/configMin.src @@ -262,7 +262,7 @@ XCOMM ############################################################### ps -ef | grep inetd | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] then - awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh + awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh else /usr/sbin/inetd -s fi diff --git a/cde/admin/IntegTools/post_install/sun/configRun.src b/cde/admin/IntegTools/post_install/sun/configRun.src index c6b437d4..bc691a10 100755 --- a/cde/admin/IntegTools/post_install/sun/configRun.src +++ b/cde/admin/IntegTools/post_install/sun/configRun.src @@ -313,7 +313,7 @@ DEFAULT_PRINTER="DtPrint" ps -ef | grep inetd | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] then - awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh + awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh else /usr/sbin/inetd -s fi diff --git a/cde/admin/IntegTools/post_install/sun/configTT.src b/cde/admin/IntegTools/post_install/sun/configTT.src index 6d6f2ca8..4f6d8341 100755 --- a/cde/admin/IntegTools/post_install/sun/configTT.src +++ b/cde/admin/IntegTools/post_install/sun/configTT.src @@ -155,7 +155,7 @@ XCOMM ###################################################################### ps -ef | grep inetd | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] then - awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh + awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh else /usr/sbin/inetd -s fi diff --git a/cde/admin/IntegTools/post_install/uxp/configTT.src b/cde/admin/IntegTools/post_install/uxp/configTT.src index e8f3e987..0b48774c 100644 --- a/cde/admin/IntegTools/post_install/uxp/configTT.src +++ b/cde/admin/IntegTools/post_install/uxp/configTT.src @@ -155,7 +155,7 @@ XCOMM ###################################################################### ps -ef | grep inetd | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] then - awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh + awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/sh else /usr/sbin/inetd -s fi diff --git a/cde/admin/IntegTools/updateTools/kfork b/cde/admin/IntegTools/updateTools/kfork index 242fd27e..d08f3663 100755 --- a/cde/admin/IntegTools/updateTools/kfork +++ b/cde/admin/IntegTools/updateTools/kfork @@ -17,17 +17,17 @@ fi ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$ if [ -s /tmp/tmp.$$ ] then - awk '{print "kill", $1}' /tmp/tmp.$$ | /bin/csh + awk '{print "kill", $1}' /tmp/tmp.$$ | /bin/sh sleep $die_time # wait for it to die ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$ if [ -s /tmp/tmp.$$ ] then - awk '{print "kill -3", $1}' /tmp/tmp.$$ | /bin/csh + awk '{print "kill -3", $1}' /tmp/tmp.$$ | /bin/sh sleep $die_time # wait for it to die ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$ if [ -s /tmp/tmp.$$ ] then - awk '{print "kill -9", $1}' /tmp/tmp.$$ | /bin/csh + awk '{print "kill -9", $1}' /tmp/tmp.$$ | /bin/sh fi rm /tmp/tmp.$$ fi diff --git a/cde/programs/dtmail/dtmail/DebugBento b/cde/programs/dtmail/dtmail/DebugBento index c8102ef9..69933f5c 100644 --- a/cde/programs/dtmail/dtmail/DebugBento +++ b/cde/programs/dtmail/dtmail/DebugBento @@ -1,17 +1,19 @@ -#!/bin/csh +#!/bin/sh # # A script that aids in debugging and testing dtmail # -if ( `uname -s` != SunOS ) then +if [ `uname -s` != SunOS ] + then echo "Only support SunOS" exit 1 endif -set echo -setenv DT_MAIL /home/dougr/INBOX -setenv DEFAULT_BACKEND Bento -setenv LD_LIBRARY_PATH ../libDtMail:../../../lib/Bento:../../../binstall/lib:$LD_LIBRARY_PATH + +export DT_MAIL=$HOME/INBOX +export DEFAULT_BACKEND=Bento +export LD_LIBRARY_PATH=../libDtMail:../../../lib/Bento:../../../binstall/lib:$LD_LIBRARY_PATH ldd -r dtmail -if ( -f core ) then +if [ -f core ] + then exec debugger dtmail core & else exec debugger dtmail & diff --git a/cde/programs/dtmail/dtmail/DebugMime b/cde/programs/dtmail/dtmail/DebugMime index da738e99..7c2507e6 100644 --- a/cde/programs/dtmail/dtmail/DebugMime +++ b/cde/programs/dtmail/dtmail/DebugMime @@ -1,18 +1,19 @@ -#!/bin/csh +#!/bin/sh # # A script that aids in debugging and testing dtmail # -if ( `uname -s` != SunOS ) then +if [ `uname -s` != SunOS ] + then echo "Only support SunOS" exit 1 endif -set echo -setenv LD_LIBRARY_PATH ../libDtMail:../../../binstall/lib:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=../libDtMail:../../../binstall/lib:$LD_LIBRARY_PATH ldd -r dtmail -setenv ARGS "$*" -if ( -f core ) then +export ARGS="$*" +if [ -f core ] + then exec debugger dtmail core & else exec debugger dtmail & diff --git a/cde/programs/dtmail/dtmail/RunLocalBento b/cde/programs/dtmail/dtmail/RunLocalBento index ccdc9c8e..eb6fca71 100644 --- a/cde/programs/dtmail/dtmail/RunLocalBento +++ b/cde/programs/dtmail/dtmail/RunLocalBento @@ -1,16 +1,16 @@ #!/bin/csh -f -set echo # # A script that aids in debugging and testing dtmail # -if ( `uname -s` != SunOS ) then +if [ `uname -s` != SunOS ] + then echo "Only support SunOS" exit 1 endif -setenv DT_MAIL /home/dougr/INBOX -setenv DEFAULT_BACKEND Bento -setenv LD_LIBRARY_PATH ../libDtMail:../../../lib/Bento:../../../binstall/lib:$LD_LIBRARY_PATH +export DT_MAIL=$HOME/INBOX +export DEFAULT_BACKEND=Bento +export LD_LIBRARY_PATH=../libDtMail:../../../lib/Bento:../../../binstall/lib:$LD_LIBRARY_PATH ldd -r ./dtmail exec dtmail & diff --git a/cde/programs/dtmail/dtmail/RunLocalMime b/cde/programs/dtmail/dtmail/RunLocalMime index 9b4e1d7a..133f7dd0 100644 --- a/cde/programs/dtmail/dtmail/RunLocalMime +++ b/cde/programs/dtmail/dtmail/RunLocalMime @@ -1,14 +1,14 @@ -#!/bin/csh -f +#!/bin/sh -f # # A script that aids in debugging and testing dtmail # -if ( `uname -s` != SunOS ) then +if [ `uname -s` != SunOS ] + then echo "Only support SunOS" exit 1 endif -set echo #setenv DEFAULT_BACKEND RFC-MIME -setenv LD_LIBRARY_PATH ../libDtMail:../../../binstall/lib:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=../libDtMail:../../../binstall/lib:$LD_LIBRARY_PATH ldd -r ./dtmail exec ./dtmail $* &