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

  1. :
  2. #
  3. #  (C) Copyright Promise Technology, Inc., 1994
  4. # This source file is the property of Promise Technology Inc.
  5. # It may not be copied or distributed in any isomorphic form
  6. # without an appropriate prior licensing arrangement with 
  7. # Promise Technology, Inc.
  8. #
  9. # Shell script for setting mode (TURBO/FAST)
  10. #
  11.  
  12. echo "This command will rebuild the kernel and shutdown the system automatically."
  13. echo " Do you really want to proceed with it (Y/N)? (default=N)\c"
  14. read AAA
  15. if [ "$AAA" != "Y" -a "$AAA" != "y" ]
  16. then
  17.     exit 0
  18. fi
  19. while [ 1 ]
  20. do
  21.     echo "\nWill the EIDE2300 controller be in TURBO mode or FAST mode"
  22.     echo " (T/F)? (default=T)\c"
  23.     read ANS
  24.     if [ "$ANS" = "" -o "$ANS" = "T" -o "$ANS" = "t" ]
  25.     then
  26.         TURBOMODE=1
  27.         STRMODE=TURBO
  28.         break
  29.     fi
  30.     if [ "$ANS" = "F" -o "$ANS" = "f" ]
  31.     then
  32.         TURBOMODE=0
  33.         STRMODE=FAST
  34.         break
  35.     fi
  36.  
  37. done
  38. strings - /bin/pwd | grep 'SCO' > /dev/null 2>&1
  39. if [ $? = 0 ]
  40. then
  41.     WWW=wd0    
  42. fi
  43.  
  44. strings - /bin/pwd | grep 'UNIX System V/386' > /dev/null 2>&1
  45. if [ $? = 0 ]
  46. then
  47.     WWW=hd
  48. fi
  49.  
  50. echo "
  51.     int    pti_turbo_mode = ${TURBOMODE};
  52. " > /etc/conf/pack.d/${WWW}/space.c
  53. /etc/conf/bin/idbuild
  54. if [ $? != 0 ]
  55. then
  56.     echo "\nSetting $STRMODE mode failed!\n\n"
  57.     exit 1
  58. fi
  59. echo "\nSetting $STRMODE mode succeeded.\n\n"
  60. sync
  61. sync
  62. cd /
  63. shutdown -y -g0
  64.