#!/bin/sh # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "@(#)sysid-setup.sh 1.5 07/03/01 SMI" # # Initial system identification. This script initializes # the system identification by discovering any pre-configured # system identification files, and possibly asking for the # language in which to display the installer, and the terminal type. # . /sbin/install-common if install_debug_isset scripts ; then set -x fi install_debug scripts "$0 begins `date`" # where to store locale variables LOCFILE=/tmp/.localeFile YES=yes NO=no PLATFORM=`/sbin/uname -p` ; export PLATFORM SHELL=/sbin/sh TEXTDOMAIN=SUNW_INSTALL_SCRIPTS HOME=/tmp/root PATH=/sbin:/usr/sbin/install.d:/usr/openwin/bin:/usr/dt/bin:${PATH}; export PATH export SHELL TEXTDOMAIN HOME echo "Searching for configuration file(s)..." /sbin/sysidfind echo "Search complete." # # Configure the frame buffer links # fbdev=`ls /devices\`/usr/sbin/prtconf -F 2>&1\`* 2>/dev/null` if [ $? -ne 0 ]; then touch /tmp/.nowin else set `echo ${fbdev}` rm -f /dev/fb ln -s $1 /dev/fb # XXX temporary # NOTE: Why is this temporary and what is its purpose? # cd /dev/fbs for nm in * do if [ ! -h /dev/$nm ]; then ln -s /dev/fbs/$nm /dev/$nm fi done for i in /sbin/install.d/fbinit/*; do if [ -x "$i" ] ; then "$i" "$fbdev" fi done echo ${fbdev} | grep "PFU\,aga" >/dev/null 2>&1 if [ $? -eq 0 ]; then if [ -x /etc/rc2.d/S91agaconfig ]; then /etc/rc2.d/S91agaconfig start fi fi RUN_SYSIDKBD=1 cd ${HOME} fi # # Remove un-needed /dev symlinks, since each one uses a page in tmpfs. # rm -f /tmp/dev/pts/4? /tmp/dev/pts/3? /tmp/dev/pts/2? /tmp/dev/pts/1? rm -f /tmp/dev/win1?? /tmp/dev/win[1-9]? /tmp/dev/win[5-9] rm -f /tmp/dev/ptyp[5-9] /tmp/dev/ptyp[a-f] rm -f /tmp/dev/ttyp[5-9] /tmp/dev/ttyp[a-f] rm -f /tmp/dev/ptyq* /tmp/dev/ptyr* /tmp/dev/ttyq* /tmp/dev/ttyr* # Do sysidkbd to configure keyboard layout if [ "${RUN_SYSIDKBD}" -eq 1 ]; then if [ -x /usr/sbin/sysidkbd ]; then /usr/sbin/sysidkbd -c fi fi # asks user for locale to run in, if we haven't already. if [ ! -f /.localeAsked ] ; then # Initialize the locale information in /tmp/root/etc/default/init, # and set the LANG variable accordingly. From this point on all # messages and executable should be running internationalized. echo "Discovering additional network configuration..." if [ -f /tmp/.nowin ] ; then # Only prompt for the locale here if we are not running in # a windowing environment. If we will be running in a # windowing environment, the locale question # will be ask after the windowing starts. /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 else # locale and termtype already asked. Locale settings can be found in # /etc/default/init and termtype can be found in the /etc/.sysIDtool.state # file. LOCFILE=/etc/default/init check_multibyte_locale $LOCFILE fi install_debug scripts "$0 completes `date`"