home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- ##
- # Multi-user startup script.
- #
- # Copyright 1997-2002 Apple Computer, Inc.
- #
- # Modified for BootCD by Charles Srstka, 2002.
- #
- # Customize system startup by adding scripts to the startup
- # directory, rather than editing this file.
- ##
-
- ##
- # Set shell to ignore Control-C, etc.
- # Prevent inadvertent problems caused by interrupting the shell during boot.
- ##
-
- stty intr undef
- stty kill undef
- stty quit undef
- stty susp undef
- stty start undef
- stty stop undef
- stty dsusp undef
-
- # Preheat the load_hdi process, so hdid doesn't time out waiting for it
- # later
- /usr/libexec/load_hdi
-
- . /etc/rc.common
-
- stty status '^T'
-
- ##
- # Handle arguments passed from init.
- ##
-
- BootType=$1; shift;
-
- if [ -z "${BootType}" ]; then BootType="multiuser"; fi
-
- ##
- # Handle options
- ##
-
- VerboseFlag=""
- SafeBoot=""
-
- args=$(getopt vx $*)
- set -- ${args};
- for option; do
- case "${option}" in
- -v)
- VerboseFlag="-v"
- ;;
- -x)
- SafeBoot="-x"
- ;;
- esac;
- done;
-
- echo ""
-
- case "${BootType}" in
- "autoboot")
- ConsoleMessage "Automatic reboot in progress"
- ;;
- "multiuser")
- ConsoleMessage "Multiuser startup in progress"
- ;;
- *)
- ConsoleMessage "Unknown boot request: multiuser startup in progress"
- ;;
- esac
-
- netboot=$(/usr/sbin/sysctl kern.netboot | /usr/bin/sed -e 's/^[^0-9]*//')
-
- #
- # Source the preheat script if it exists, speeds CD boot by > 1 minute
- #
- if [ -f /System/Installation/CDIS/preheat.sh ]; then
- /System/Installation/CDIS/preheat.sh
- fi
-
- ##
- # Mount essential local filesystems (according to /etc/fstab).
- ##
-
- ConsoleMessage "Mounting local filesystems"
-
- mount -u -o ro /
- #mount_synthfs synthfs /Volumes
- #autodiskmount -va
- mount -t fdesc -o union stdin /dev
- mount_volfs /.vol
-
- ##
- # Start kextd
- ##
-
- if [ "${SafeBoot}" = "-x" ]; then
- ConsoleMessage "Configuring kernel extensions for safe boot"
- kextd -x
- else
- ConsoleMessage "Configuring kernel extensions"
- if [ -e /private/etc/fwxstartup ]; then
- /private/etc/fwxstartup
- fi
- kextd
- fi
-
- #
- # Start autodiskmount so DiskArbitration can be started and
- # we can start the ram disk
- #
-
- /sbin/autodiskmount
-
- #
- # Start the ram disk and put important stuff on it
- #
-
- /usr/bin/RamDisk /etc/RamDiskContents RAMDISK_SIZE /ramdisk
-
- #
- # Now kill autodiskmount, so it can be started properly later
- #
-
- kill `ps -axec | grep autodiskmount | cut -c1-5`
-
- ##
- # Early start for any startup items for performance reasons
- ##
- configd
-
- ##
- # Start System Services
- ##
-
- # Set language from CDIS.custom - assumes this is parse-able by sh
- . /var/log/CDIS.custom
- export LANGUAGE
-
- #
- # Get things running with SystemStarter
- #
-
- /sbin/SystemStarter -g
-
- #
- # Just in case SystemStarter doesn't put up the login window, do it
- # ourselves
- #
-
- /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow
-
- exit 0
-