home *** CD-ROM | disk | FTP | other *** search
/ MacPeople 2003 February 1 / MACPEOPLE-2003-02-01.ISO.7z / MACPEOPLE-2003-02-01.ISO / 特集1/Install&Backup / BootCD(10.2) / BootCD.dmg / BootCD.app / Contents / Resources / rc.cdrom < prev    next >
Text File  |  2002-10-04  |  3KB  |  130 lines

  1. #!/bin/sh
  2. # Copyright 2000, Apple Computer Inc.
  3. # pmb
  4.  
  5. #
  6. # Arg[1] is passed from /etc/rc
  7. #
  8. BootType=${1:-multiuser}
  9.  
  10. #
  11. # Source the preheat script if it exists, speeds CD boot by > 1 minute
  12. #
  13. if [ -f /System/Installation/CDIS/preheat.sh ]; then
  14.     /System/Installation/CDIS/preheat.sh
  15. fi
  16.  
  17. #
  18. # Load Kernel Extensions
  19. #
  20. kextd
  21.  
  22. #
  23. # Set up the loopback address so NetInfo can talk to itself
  24. #
  25. /sbin/ifconfig lo0 127.0.0.1 netmask 255.0.0.0 up
  26.  
  27. #
  28. # mount volfs for Carbon
  29. #
  30. mount_volfs /.vol
  31.  
  32. # mount root_device to update vnode information
  33. #
  34. mount -u -o ro /
  35.  
  36. #
  37. # Source a local configuration script if present
  38. #
  39. if [ -f /etc/rc.cdrom.local ]; then
  40.     /etc/rc.cdrom.local
  41. fi
  42.  
  43. #
  44. # Start AppleTypeServices
  45. #
  46. START_ATS=/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Support/StartATSServer
  47.  
  48. if [ -f "${START_ATS}" ]; then
  49.     "${START_ATS}"
  50. fi
  51.  
  52. #
  53. # Start the PasteBoardServer
  54. #
  55. START_PBS=/System/Library/CoreServices/pbs
  56.  
  57. if [ -f "${START_PBS}" ]; then
  58.         "${START_PBS}" &
  59. fi
  60.  
  61. /System/Library/StartupItems/AppServices/AppServices
  62. /System/Library/StartupItems/SecurityServer/SecurityServer
  63. /System/Library/StartupItems/AuthServer/AuthServer
  64. /System/Library/StartupItems/Cron/Cron
  65. /System/Library/StartupItems/Accounting/Accounting
  66.  
  67. #
  68. # Start the Window Manager
  69. #
  70. WINDOW_MGR="/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/Window Manager"
  71.  
  72. if [ -x "${WINDOW_MGR}" ]; then
  73.     "${WINDOW_MGR}"
  74. fi
  75.  
  76.  
  77. #
  78. # The Launcher is responsible for the progress bar while the Installer loads
  79. #
  80. Launch=/System/Installation/CDIS/splash
  81.  
  82. #
  83. # The Installer gets around!
  84. #
  85. if     [ -x /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder ]; then
  86.   Finder=/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
  87. fi
  88.  
  89. if     [ -x /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock ]; then
  90.   Dock=/System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
  91. fi
  92.  
  93. if     [ -x /sbin/autodiskmount ]; then
  94.   Automount=/sbin/autodiskmount
  95. fi
  96.  
  97. #
  98. # Here we go!
  99. #
  100. export OS_INSTALL=1
  101. ${Dock} &
  102. ${Launch} ${Finder}
  103. err=$?
  104.  
  105. #
  106. # We only get here if the Installer exits abnormally
  107. # The script that launched us will power off the machine, so we'll reboot first
  108. #
  109.  
  110. # sleep just long enough for the WM to settle in case the installer crashes instantly
  111. sleep 2
  112.  
  113. # (The [M] keeps us from matching ourself)
  114. kill `ps -ax | awk '/Window [M]anager/ {print $1}'`
  115.  
  116. # popconsole tells the kernel to tear down the blue screen and spinning #kernel wheel
  117. /System/Installation/CDIS/popconsole
  118.  
  119. echo
  120. echo "The Installer has unexpectedly quit. (error ${err})"
  121. echo
  122.  
  123. echo
  124. echo "Press the Return key to restart the computer..."
  125. read
  126.  
  127. /sbin/reboot
  128.  
  129.