home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 15 / boot-disc-1997-11.iso / Debian / Tools / drv1440.bin / INSTALL.SH next >
Linux/UNIX/POSIX Shell Script  |  1997-08-01  |  1KB  |  50 lines

  1. #!    /bin/sh
  2.  
  3. # Install the kernel from this boot floppy onto the root filesystem.
  4. # Don't run LILO, so the hard disk won't be bootable until more is done.
  5. # The commands used by this script are limited to the ones available on
  6. # the root floppy.
  7.  
  8. #set -x
  9. set -e
  10. umask 022
  11. retcode=0
  12.  
  13. extract="cpio --format=ustar --extract --unconditional"
  14. if [ -x /bin/star -o -x /usr/bin/star ]; then
  15.     extract="star"
  16. fi
  17.  
  18. if [ ! -f install.sh ]; then
  19.     echo     "Error: Change directory to the floppy before running this script."
  20.     1>&2
  21.     exit -1
  22. fi
  23.  
  24. FLOPPY=`pwd`
  25.  
  26. if [ $# -gt 0 ]; then
  27.     DESTDIR=$1
  28. fi
  29.  
  30. (cd ${DESTDIR}/; zcat < $FLOPPY/modules.tgz|$extract)
  31. #(cd ${DESTDIR}/; depmod -a)
  32.  
  33. #mv ${DESTDIR}/bin/mount ${DESTDIR}/bin/mount.old
  34. #mv ${DESTDIR}/bin/umount ${DESTDIR}/bin/umount.old
  35.  
  36. #set +e 
  37. #(cd ${DESTDIR}/; zcat < $FLOPPY/nettools.tgz|$extract)
  38.  
  39. #for i in mount umount; do
  40. #    if [ ! -x ${DESTDIR}/bin/$i ]; then
  41. #        mv ${DESTDIR}/bin/$i.old ${DESTDIR}/bin/$i
  42. #        retcode=-1
  43. #    else
  44. #        rm -f ${DESTDIR}/bin/$i.old
  45. #    fi
  46. #done
  47.  
  48. sync
  49. exit $retcode
  50.