home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 August
/
VPR9708B.ISO
/
BIOS
/
free
/
Drivers
/
f56v116.exe
/
SCO
/
SISS.TAR
/
usr
/
lib
/
custom
/
sis.rmv
Wrap
Text File
|
1995-09-15
|
1KB
|
67 lines
# @(#) install.sis 1.0 07/10/95
#
# Copyright (C) SIS Technology, Inc. 1995
#
#
PATH=/bin:/usr/bin:/etc
TMP=/tmp
CONFDIR=/etc/conf/cf.d
PACKD=/etc/conf/pack.d
UINSTD=/usr/lib/custom
SDEVICED=/etc/conf/sdevice.d
#
: ${OK=0} ${FAIL=1} ${TRUE=0} ${FALSE=1}
# Function definitions
cleanup()
{
rm -rf $TMP/*.new
exit $1
}
# usage: safecopy file1 file2
# copies file1 to file2 without chance of interruption
safecopy()
{
trap "" 1 2 3 15
cp $1 $2
trap 1 2 3 15
}
# usage: setbootstring
# sets DEFBOOTSTR
setbootstring()
{
sed -e 's;hd(40)unix hd=sis;hd(40)unix;' < /etc/default/boot > /tmp/boot.$$
mv /tmp/boot.$$ /etc/default/boot
}
#
# MAIN()
#
trap 'cleanup $FAIL' 1 2 3 15
#setbootstring
grep -v "sis" $CONFDIR/mscsi > $TMP/mscsi.new
safecopy $TMP/mscsi.new $CONFDIR/mscsi
sed -e 's;N;Y;' < $SDEVICED/wd > $TMP/wd.new
safecopy $TMP/wd.new $SDEVICED/wd
sed -e 's;N;Y;' < $SDEVICED/wd0 > $TMP/wd0.new
safecopy $TMP/wd0.new $SDEVICED/wd0
sed -e 's;N;Y;' < $SDEVICED/wd1 > $TMP/wd1.new
safecopy $TMP/wd1.new $SDEVICED/wd1
sed -e 's;Y;N;' < $SDEVICED/sis > $TMP/sis.new
safecopy $TMP/sis.new $SDEVICED/sis
rm -f $TMP/*.new
cd /etc/conf/cf.d
./link_unix
exit $OK