home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # Copyright (c) 1999 SuSE GmbH Nuernberg, Germany. All rights reserved
- #
- # Author: Mathias Kettner <kettner@suse.de> 1999
- #
- # ----------------------------------------------------------------------
- # bootsetup script for YaST2
- #
- # This script is executed after you installed your system with
- # YaST2 and immediately after it has been booted for the first
- # time.
- #
- # ----------------------------------------------------------------------
-
- touch /etc/modules.conf
- /sbin/depmod -a -F /boot/System.map-`uname -r` `uname -r`
-
- #
- # Start syslog daemon
- #
-
- test -x /sbin/init.d/syslog && /sbin/init.d/syslog start
-
- # Touch info dir. SuSEconfig probably should regenerated some
- # indices
-
- for i in /usr/info/ \
- /usr/lib/info/ \
- /usr/local/info/ \
- /usr/local/lib/info/ \
- /usr/X11R6/info/ \
- /usr/X11R6/lib/info/ \
- /usr/X11R6/lib/xemacs/info/ \
- /var/adm/packages ; do
- test -d $i && touch $i 2> /dev/null
- done
-
- test -e /etc/rc.config && . /etc/rc.config
-
- # Rootpasswd is already set by YaST2.
-
- # Touch man page directories. This makes SuSEconfig create new man
- # page indices
-
- for i in /usr/info /usr/man /usr/X11R6/man /usr/openwin/man \
- /usr/lib/perl5/man /usr/lib/teTeX/man /usr/local/man ; do
- if [ -d $i ] ; then
- find $i -follow -type d 2> /dev/null | xargs touch 2> /dev/null
- fi
- done
-
- # there was a bug in former releases of ps.tgz - a unreadable /etc/psdevtab
- # can be there - this can be deleted. Recreate it simply with calling
- # ps as root. This procedure speeds up ps very much...
- # Not longer neccessary?
-
- rm -f /etc/psdevtab
- ps > /dev/null 2> /dev/null
-
- # Now prepare for starting YaST2 again. It needs to complete
- # the installation. If it was not able to unmount the CD-Rom
- # during the first part of the installation (this happens if
- # you have less than 48M of RAM), only the packages from the
- # first CD have been installed. The rpm installation must be
- # continued in this case.
-
- # Start cardmanager for laptops
-
- if grep -qs '^PCMCIA:' /etc/install.inf ; then
- test -x /sbin/init.d/pcmcia && /sbin/init.d/pcmcia start
- fi
-
- sleep 1
-
- # Start portmapper in case the installation is done via nfs.
- # The network configuration itself is still active, even if
- # the root filesystem has been remounted and the processes
- # terminated. It is saved in the kernel.
-
- /sbin/portmap
-
- #
- # make sure, that we have no "future files" in kernel sources
- #
- find /usr/src/linux* -mtime -0 2>/dev/null | xargs --no-run-if-empty touch
-
- #
- # make sure, that texhash will be started in SuSEconfig.
- #
- mkdir -p /var/adm/SuSEconfig
- touch /var/adm/SuSEconfig/run-texhash
-
- #
- # Start Y2 and tell it to continue the installation. It will install
- # the remaining packages and afterwards call SuSEconfig.
- #
- SPID=`/lib/YaST2/bin/startshell /dev/tty2`
- /lib/YaST2/bin/YaST2 installation '(.continue)'
- kill $SPID
- #
- # Stop pcmcia again. If needed it will be started by the
- # init scripts again...
- #
- test -x /sbin/init.d/pcmcia && /sbin/init.d/pcmcia stop
-
- #
- # Tell the unexperienced user to login as root.
- #
-
- echo_login_as_root () {
- case "$LANGUAGE" in
- german|de|de_*)
- echo "Geben Sie jetzt \"root\" ein um sich als Benutzer root einzuloggen..."
- ;;
- french|fr|fr_*)
- echo "Tapez maintenant \"root\" pour vous connecter"
- echo "en tant qu'utilisateur root..."
- ;;
- *)
- echo "Please enter \"root\" to login as user root..."
- ;;
- esac
- }
-
- exec > /etc/issue-SuSE-first-run
- #
- # Ring the bell
- #
- tput bel
-
- #
- # Almost white border line on grey background
- #
- tput smacs
- tput bold; tput setab 7; tput setaf 7
- echo -n ┌
- echo -n ───────────────────────────────────────
- echo -n ───────────────────────────────────────
- tput sgr0; tput setab 7; tput setaf 0
- echo -n ┐
- tput rmacs
-
- #
- # Red text on grey background and borders on both sides
- #
- echo_login_as_root | while read line ; do
- tput bold; tput setab 7; tput setaf 7
- tput smacs; echo -n '│'; tput rmacs; echo -n " "
- tput sgr0; tput setab 7; tput setaf 1
-
- echo -n "$line" ; tput el; tput hpa 79
-
- tput sgr0; tput setab 7; tput setaf 0
- tput smacs; echo -n '│'; tput rmacs; tput cud1
- done
-
- #
- # Almost black border line on grey background
- #
- tput smacs
- tput bold; tput setab 7; tput setaf 7
- echo -n └
- tput sgr0; tput setab 7; tput setaf 0
- echo -n ───────────────────────────────────────
- echo -n ───────────────────────────────────────
- echo -n ┘
- tput rmacs
-
- tput setab 0; tput setaf 7; tput sgr0; tput cud1
-
-
- #
- # Now we are done. Remove the flag file to avoid this script
- # to be executed at next boot time as well.
- #
- rm -f /var/lib/YaST2/runme_at_boot
-