home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / sonstige / dawicon / dawi.arj / DC-93-M1 / LINUX / DC_L121.SH next >
Linux/UNIX/POSIX Shell Script  |  1995-04-21  |  2KB  |  87 lines

  1. #!/bin/sh
  2. #
  3. # ---- Installation-Script for DC93-MACH1 Low-Level-Driver
  4. #
  5. echo "installing Low-Level-Driver, Please wait..."
  6. #
  7. VERSION="6.1.1"
  8. ROOT=`echo $USER`
  9. LINUX_PATH=/usr/src/linux
  10. LINUX_DRIVER_PATH=/usr/src/linux/drivers/scsi
  11. ARCH="i386"
  12. PROG_ENTRY=$0
  13.  
  14. if [ $PROG_ENTRY != "/tmp/dc_l121.sh" ]; then
  15.     echo "must have kit in /tmp. Please copy those and unmount floppy"
  16.     exit 1
  17. fi
  18. if [ $ROOT != "root" ]; then
  19.     echo "must be root-user to install Kit"
  20.     exit 1
  21. fi
  22. if [ ! -x /bin/mv ]; then
  23.     echo "mv not installed"
  24.     exit 1
  25. fi
  26. cd $LINUX_PATH
  27. if [ $PWD != "$LINUX_PATH" ]; then
  28.     echo "Path $LINUX_PATH does not exist"
  29.     exit 1
  30. fi
  31. cd arch/$ARCH
  32. if [ -f config.in ]; then
  33.     echo "renaming config.in to config_in.kdw"
  34.     mv -f config.in config_in.kdw
  35. fi
  36. if [ -f zImage ]; then
  37.     echo "renaming zImage to zImage.kdw"
  38.     mv -f zImage zImage.kdw
  39. fi
  40. cd $LINUX_DRIVER_PATH
  41. if [ $PWD != "$LINUX_DRIVER_PATH" ]; then
  42.     echo "Path $LINUX_DRIVER_PATH does not exist"
  43.     exit 1
  44. fi
  45. if [ -f Makfile ]; then
  46.     echo "renaming Makefile to Makefile.kdw"
  47.     mv -f Makefile Makefile.kdw
  48. fi
  49. if [ -f hosts.c ]; then
  50.     echo "renaming hosts.c to hosts_c.kdw"
  51.     mv -f hosts.c hosts_c.kdw
  52. fi
  53. #
  54. cd /
  55. #
  56. if [ ! -f /tmp/dc93kit.tgz ]; then
  57.     echo "DC93-Kit does not exist"
  58.     exit 1
  59. fi
  60. if [ ! -x /bin/tar ]; then
  61.     echo "tar is not installed"
  62.     exit 1
  63. fi
  64. echo "installing the Kit-Files to Target for Driver-Version $VERSION"
  65. /bin/tar xvzf /tmp/dc93kit.tgz
  66. sync
  67. echo "please insert new empty floppy in drive A"
  68. sleep 10
  69. cd $LINUX_PATH
  70. mv drivers/scsi/dc93.o drivers/scsi/dc93_o.tmp
  71. echo "sitting on $PWD, now doing make clean, make config, make dep, make zdisk"
  72. make clean
  73. sync
  74. mv drivers/scsi/dc93_o.tmp drivers/scsi/dc93.o
  75. make config
  76. sync
  77. make dep
  78. sync
  79. make zdisk
  80. sync
  81. rdev -R /dev/fd0 1
  82. echo "doing reboot, please standby and leave Diskette in Drive"
  83. cd /
  84. sync
  85. reboot
  86.  
  87.