home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 4 Drivers / 04-Drivers.zip / 2300eide.zip / REMOVE < prev    next >
Text File  |  1994-11-14  |  1KB  |  58 lines

  1. #
  2. #  (C) Copyright Promise Technology, Inc., 1994
  3. # This source file is the property of Promise Technology Inc.
  4. # It may not be copied or distributed in any isomorphic form
  5. # without an appropriate prior licensing arrangement with 
  6. # Promise Technology, Inc.
  7. #
  8. # Shell script to remove UNIX driver
  9. #
  10.  
  11. TMPFILE=/tmp/tmp$$
  12. MDEVICE=/etc/conf/cf.d/mdevice
  13. SCOHDSPACE=/etc/conf/pack.d/hd/space.c
  14. SCOPACK=/etc/conf/pack.d/wd0
  15. ATTPACK=/etc/conf/pack.d/hd
  16.  
  17. strings - /bin/pwd | grep 'SCO' > /dev/null 2>&1
  18. if [ $? = 0 ]
  19. then
  20.     UNIXID=SCO
  21. fi
  22.  
  23. strings - /bin/pwd | grep 'UNIX System V/386' > /dev/null 2>&1
  24. if [ $? = 0 ]
  25. then
  26.     UNIXID="AT&T"
  27. fi
  28.  
  29. echo "\n\nRemoving driver ..."
  30.  
  31. # mdevice
  32. if [ "$UNIXID" = "AT&T" ]
  33. then 
  34.     sed -e '/^hd/s/[     ]pti/    hd/g' $MDEVICE > $TMPFILE
  35. fi
  36. cp $TMPFILE $MDEVICE 2> /dev/null
  37.  
  38. if [ $UNIXID = SCO ]
  39. then
  40.     THISPACK=$SCOPACK
  41. else
  42.     THISPACK=$ATTPACK
  43. fi
  44.     
  45. cp ${THISPACK}/Driver.ptibak ${THISPACK}/Driver.o 2> /dev/null
  46. rm ${THISPACK}/space.c $THISPACK/Driver.ptibak > /dev/null 2>&1
  47.  
  48. /etc/conf/bin/idbuild
  49. if [ $? != 0 ]
  50. then
  51.     exit 1
  52. fi
  53. rm /bin/ptisetmode > /dev/null 2>&1
  54. rm $TMPFILE > /dev/null 2>&1
  55. sync
  56. sync
  57. exit 0
  58.