#!/bin/sh # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "@(#)install-ui-start.sh 1.3 07/02/06 SMI" # # # This script starts the install process. It either starts it # in the same console as being run in, or starts up a windowing # system if necessary. # . /sbin/install-common if install_debug_isset scripts ; then set -x fi install_debug scripts "$0 begins `date`" SHELL=/sbin/sh TEXTDOMAIN=SUNW_INSTALL_SCRIPTS PATH=/sbin:/usr/sbin/install.d:/usr/X11/bin:/usr/openwin/bin:/usr/dt/bin:${PATH}; export PATH PLATFORM=`/sbin/uname -p` export PLATFORM install_debug scripts "Platform: $PLATFORM" LOCFILE=/tmp/.localeFile #make home dir to a writeable place HOME=/tmp/root export SHELL TEXTDOMAIN PLATFORM HOME if [ "${RUN_WIN}" = "yes" ]; then install_debug scripts "Starting window system.." # if the hostname is not yet configured we need a dummy entry # in /etc/hosts so the window system will work # name=`uname -n` if [ -z "${name}" ]; then uname -S localhost fi # Set up the customized install user's account directory (/tmp/root); # copy the menu file to a writeable area in case localization # updates are required by sysconfig; copy the customized Xdefaults, # openwin-defaultfont (optional), twmrc, and Xinitrc files to # ${HOME} # if [ -f /usr/dt/bin/Xsession ] ; then XINIT="/usr/openwin/bin/xinit /usr/dt/bin/Xsession -- -noreset -nobanner" /sbin/setup-window-config dtwm else XINIT="/usr/openwin/bin/xinit" /sbin/setup-window-config twm fi OPENWINHOME=/usr/openwin; export OPENWINHOME # Start the window system # install_debug scripts "executing $XINIT" if [ "${PLATFORM}" = "i386" -a ! -f /tmp/.install_boot ]; then echo "" echo "" echo " Starting Solaris Interactive (graphical user interface) Installation. You must respond to the first question within 30 seconds or the installer proceeds in a non-window environment (console mode). If the screen becomes blank or unreadable the installer proceeds in console mode. If the screen does not properly revert to console mode, restart the installation and make the following selection: Solaris Interactive Text (Console session) " echo "Press ENTER to continue." read a fi $XINIT # If the X environment fails for some reason, start sysconfig without the window # system as if the user had booted with the -nowin option # # If we get here, we ALWAYS want to proceed as if a -nowin system install_debug scripts "$XINIT failed" touch /tmp/.nowin RUN_WIN=no;export RUN_WIN RUN_TEXT_INSTALL=yes; export RUN_TEXT_INSTALL ON_CONSOLE=yes; export ON_CONSOLE /usr/sbin/sysidnet -l -y grep '^LANG=' /etc/default/init > $LOCFILE grep '^LC_.*=' /etc/default/init >> $LOCFILE echo "NLSPATH=/usr/lib/install/data/lib/locale/%L/%N:$NLSPATH" >> $LOCFILE check_multibyte_locale $LOCFILE fi # run installation CLI install_debug scripts "Starting text-based CLI.." /sbin/install-begin install_debug scripts "$0 completes `date`"