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
Text File  |  1995-09-15  |  1KB  |  67 lines

  1. #       @(#) install.sis 1.0 07/10/95
  2. #
  3. #       Copyright (C) SIS Technology, Inc. 1995 
  4. #
  5. #
  6.  
  7. PATH=/bin:/usr/bin:/etc
  8. TMP=/tmp
  9. CONFDIR=/etc/conf/cf.d
  10. PACKD=/etc/conf/pack.d
  11. UINSTD=/usr/lib/custom
  12. SDEVICED=/etc/conf/sdevice.d
  13.  
  14. #
  15. : ${OK=0} ${FAIL=1} ${TRUE=0} ${FALSE=1}
  16.  
  17. # Function definitions
  18.  
  19. cleanup() 
  20. {
  21.         rm -rf $TMP/*.new
  22.     exit $1
  23. }
  24.  
  25. # usage: safecopy file1 file2
  26. # copies file1 to file2 without chance of interruption
  27.  
  28. safecopy() 
  29. {
  30.         trap "" 1 2 3 15
  31.         cp $1 $2
  32.         trap 1 2 3 15
  33. }
  34.  
  35.  
  36. # usage: setbootstring
  37. # sets DEFBOOTSTR
  38.  
  39. setbootstring() 
  40. {
  41.     sed -e 's;hd(40)unix hd=sis;hd(40)unix;' < /etc/default/boot > /tmp/boot.$$
  42.     mv /tmp/boot.$$ /etc/default/boot
  43. }
  44.  
  45.  
  46. #
  47. #   MAIN()
  48. #
  49.  
  50. trap 'cleanup $FAIL' 1 2 3 15
  51. #setbootstring
  52. grep -v "sis" $CONFDIR/mscsi > $TMP/mscsi.new
  53. safecopy $TMP/mscsi.new $CONFDIR/mscsi
  54. sed -e 's;N;Y;' < $SDEVICED/wd > $TMP/wd.new
  55. safecopy $TMP/wd.new $SDEVICED/wd
  56. sed -e 's;N;Y;' < $SDEVICED/wd0 > $TMP/wd0.new
  57. safecopy $TMP/wd0.new $SDEVICED/wd0
  58. sed -e 's;N;Y;' < $SDEVICED/wd1 > $TMP/wd1.new
  59. safecopy $TMP/wd1.new $SDEVICED/wd1
  60. sed -e 's;Y;N;' < $SDEVICED/sis > $TMP/sis.new
  61. safecopy $TMP/sis.new $SDEVICED/sis
  62. rm -f $TMP/*.new
  63. cd /etc/conf/cf.d
  64. ./link_unix
  65.  
  66. exit $OK
  67.