home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 August
/
VPR9708B.ISO
/
BIOS
/
free
/
Drivers
/
f55v316.exe
/
SIS.TAR
/
tmp
/
install.sis
< prev
Wrap
Text File
|
1995-03-03
|
2KB
|
77 lines
# @(#) install.sis 1.0 02/20/95
#
# Copyright (C) Silicon Integrated Systems, Corp. 1994-1995
#
#
PATH=/bin:/usr/bin:/etc
TMP=/tmp
CONFDIR=/etc/conf/cf.d
PACKDHD=/etc/conf/pack.d/hd
UINSTD=/usr/lib/custom
SDEVICED=/etc/conf/sdevice.d
#
: ${OK=0} ${FAIL=1} ${TRUE=0} ${FALSE=1}
# Function definitions
cleanup()
{
rm -rf $tmp*
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(40)unix hd=sis0;' < /etc/default/boot > /tmp/boot.$$
mv /tmp/boot.$$ /etc/default/boot
}
#
# MAIN()
#
trap 'cleanup $FAIL' 1 2 3 15
#setbootstring
rm -f $UINSTD/PCISiSx.conf
grep "wd\ " $CONFDIR/mdevice >> $UINSTD/PCISiSx.conf
grep "wd0" $CONFDIR/mdevice >> $UINSTD/PCISiSx.conf
grep "wd1" $CONFDIR/mdevice >> $UINSTD/PCISiSx.conf
cat $CONFDIR/mdevice $CONFDIR/Master > $TMP/mdevice.new
safecopy $TMP/mdevice.new $CONFDIR/mdevice
grep -v "wd\ " $CONFDIR/mdevice > $TMP/mdevice.new
safecopy $TMP/mdevice.new $CONFDIR/mdevice
grep -v "wd0" $CONFDIR/mdevice > $TMP/mdevice.new
safecopy $TMP/mdevice.new $CONFDIR/mdevice
grep -v "wd1" $CONFDIR/mdevice > $TMP/mdevice.new
safecopy $TMP/mdevice.new $CONFDIR/mdevice
sed -e 's;Y;N;' < $SDEVICED/wd > $TMP/wd.new
safecopy $TMP/wd.new $SDEVICED/wd
sed -e 's;Y;N;' < $SDEVICED/wd0 > $TMP/wd0.new
safecopy $TMP/wd0.new $SDEVICED/wd0
sed -e 's;Y;N;' < $SDEVICED/wd1 > $TMP/wd1.new
safecopy $TMP/wd1.new $SDEVICED/wd1
sed -e 's;wd0;sis0;g' < $PACKDHD/space.c > $TMP/space.new
safecopy $TMP/space.new $PACKDHD/space.c
rm -f $TMP/*.new
cd $CONFDIR
./link_unix
exit $OK