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

  1. #
  2. # This is the Installation CD system startup file.  
  3. # It manages starting up all the necessary servers 
  4. # and ensuring a sane system state.  Once the Installer
  5. # is done it reboots the machine.
  6. #
  7. # Do not edit or change this file.  
  8. #
  9.  
  10. # ++++++++++
  11. #    function: launch exectuable_path [ thread_to_wait_for ]
  12. # +++++
  13.  
  14. launch () {
  15.     if [ -f "/boot/$1" ]
  16.     then
  17.         "/boot/$1" &
  18.         [ "$2" != "" ] && waitfor "$2"
  19.         return 1
  20.     else
  21.         echo There is no "$1"
  22.     fi
  23.     return 0
  24. }
  25.  
  26.  
  27. #
  28. # First we set up a bunch environment variables that we'll need later.
  29. #
  30.  
  31. export PATH=:/bin:/boot/beos/apps:/boot/beos/preferences
  32. export HOME=/boot/home
  33. export SHELL=/bin/sh
  34. export USER=ethyl
  35. export GROUP=group
  36.  
  37. #
  38. # Start only the necessary servers
  39. SERVERS=beos/system/servers
  40. SCRIPTS=beos/system/boot
  41.  
  42. launch $SERVERS/app_server picasso        # launch app_server
  43. launch $SERVERS/registrar _roster_thread_    # launch registrar
  44. waitfor _input_server_event_loop_            # wait for input devices
  45.  
  46.  
  47.  
  48. #
  49. # Start the Installer
  50. #
  51. APPS=beos/apps
  52.  
  53. if [ -f /boot/$APPS/Installer ]
  54. then
  55.     /boot/$APPS/Installer
  56. else
  57.     # There is no Installer.  Yowza.
  58.     if [ -f /boot/$APPS/Terminal ]
  59.     then
  60.         /boot/$APPS/Terminal
  61.     else
  62.         echo There is no Terminal.  You are now in a bad spot.
  63.         echo You have our condolences.
  64.     fi
  65. fi
  66.  
  67. #
  68. # Make sure that everything is flushed.
  69. sync
  70.  
  71.  
  72. # reboot in 5 seconds...
  73. #
  74. shutdown -r -q -d 5 &
  75.  
  76. # ...pop out the cd so we don't boot off of it again.
  77. # Figuring out which device we booted off of is kind of interesting
  78. #
  79. eject  `df | grep ^/boot | awk '{ print $NF }'`
  80.