home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 49 / PCPP49b.iso / freebies / BeOS5-PersonalEdition / data1.cab / Data_Files / image.be / beos / system / boot / InstallerFinishScript < prev    next >
Encoding:
Text File  |  2000-03-24  |  1.3 KB  |  59 lines

  1. #!/bin/sh
  2. #
  3. # (c)1997, 98, 99 Be, Inc. All rights reserved.
  4.  
  5. CMD_ESC='-'
  6. ERR_NO_VOL='-2'
  7.  
  8. prog_name="${0}"
  9.  
  10. volume="${1}"
  11. device="${2}"
  12.  
  13. # Check to see if we should do anything
  14. if [ -z "${volume}" ] ; then
  15.     echo "Usage: ${prog_name} VOLUME_NAME DEVICE_NAME"
  16.     exit "${ERR_BAD_CMD}"
  17. fi
  18.  
  19. # Check to see if the disk exists and is mounted
  20. if ! cd /"${volume}" &>/dev/null ; then
  21.     echo "${prog_name}: \"${volume}\" not mounted"
  22.     exit "${ERR_NO_VOL}"
  23. fi
  24.  
  25.  
  26. #
  27. # create var and tmp directory so the kernel can create the swap file
  28. #
  29. mkdir -p "/${volume}/var/tmp"
  30.  
  31.  
  32. #
  33. # cleanup the mimetypes to get rid of HFS crud
  34. #
  35. mimeset -F /"${volume}"/optional/GNU/*
  36.  
  37. #
  38. # First make this partition bootable
  39. #
  40. installbootsector /"${volume}"/beos/system/zbeos
  41.  
  42. #
  43. # Now install the boot manager
  44. #
  45.  
  46. alert --warning --modal "Would you like to install the Be boot manager?
  47.  
  48. The Be boot manager will allow you to choose which operating system to boot when your computer starts up.
  49.  
  50. You should not do this if you have another boot manager such as PowerBoot or System Commander installed on your system." "Yes" "No"
  51. _retval=$?
  52. [ $_retval -eq 0 ] && bootman -d /"${volume}"/home/config/settings/bootman/MBR -b /"${volume}"
  53.  
  54.  
  55. # arm the InstallerRebootScript so that old mime can be updated
  56. mv "beos/system/boot/InstallerRebootScript.cd" "beos/system/boot/InstallerRebootScript" &>/dev/null
  57.  
  58. exit 0
  59.