home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 4.0 PR1 / NeXT_NEXTSTEP_4.0_PR1_(beta).rar / Openstep4-Pr1User.iso / NextCD / CDIS / fixdisk < prev    next >
Text File  |  1994-05-09  |  876b  |  33 lines

  1. #!/bin/sh
  2. # fixdisk.sh
  3. # Installs the minisystem onto the given hard disk, if possible
  4. # Usage: fixdisk <device>
  5. # Example: fixdisk sd0a
  6.  
  7. FSCK=/usr/etc/fsck
  8. MOUNT=/usr/etc/mount
  9. TAR=/usr/bin/gnutar
  10. DITTO=/NextCD/CDIS/ditto
  11. BOM=/usr/lib/NextStep/BaseSystem.bom
  12. MOUNTPOINT=/private/tmp/mnta
  13. REBOOT=/usr/etc/reboot
  14. MV=/bin/mv
  15.  
  16. disk=/dev/${1}
  17. rdisk=/dev/r${1}
  18.  
  19. if ${FSCK} -p $rdisk && ${MOUNT} -n $disk ${MOUNTPOINT} ; then
  20.     echo Copying system to ${1}
  21.     ${DITTO} -arch `/usr/bin/arch` -lang English -bom ${BOM} -outBom ${MOUNTPOINT}/BaseSystem.bom / ${MOUNTPOINT}
  22.     ${MV} ${MOUNTPOINT}/BaseSystem.bom ${MOUNTPOINT}/usr/lib/NextStep/BaseSystem.bom
  23.     echo
  24. else
  25.     echo
  26.     echo Could not mount hard disk.  This utility cannot be used to repair your disk.
  27.     echo
  28. fi
  29. echo Press Return to restart the computer.
  30. read foo
  31. echo Restarting computer.  Please wait...
  32. ${REBOOT}
  33.