#!/bin/sh export TEXTDOMAIN=slint . gettext.sh TMP=/var/log/setup/tmp if [ ! -d $TMP ]; then mkdir -p $TMP fi T_PX="`cat $TMP/SeTT_PX`" while [ "`cat $T_PX/etc/shadow | grep 'root:' | cut -f 2 -d :`" = "" ]; do # There is no root password dialog --title "`gettext "WARNING: NO ROOT PASSWORD DETECTED"`" --yesno "`gettext "There is \ currently no password set on the system administrator account (root). \ It is recommended that you set one now so that it is active the first \ time the machine is rebooted. This is especially important if you're \ using a network enabled kernel and the machine is on an Internet \ connected LAN. Would you like to set a root password?"`" 10 80 if [ $? = 0 ] ; then echo echo echo chroot $T_PX /usr/bin/passwd root echo eval_gettext "Press [enter] to continue:" read junk; echo # Here we drop through, and if there's still no password the menu # runs again. else # Don't set a password: break; fi done if [ -x $T_PX/usr/sbin/adduser ]; then while [ 0 ];do dialog --visit-items --title "`gettext "CREATION OF REGULAR USER ACCOUNTS"`" --default-item "Create" \ --menu "`gettext "You can create regular user accounts now, before even starting your new system."`" \ 11 80 3 \ "Create" "`gettext "Create a new user account"`" \ "Display" "`gettext "Display the already created user accounts"`" \ "Done" "`gettext "Creation of user accounts completed"`" \ 2> $TMP/return REPLY=`cat $TMP/return` rm -f $TMP/return clear if [ "$REPLY" = "Create" ]; then ( trap 'echo "SIGINT caught." > /tmp/trap' SIGINT chroot $T_PX /usr/sbin/adduser echo gettext "Press ENTER to continue." read dummy ) elif [ "$REPLY" = "Display" ]; then ( trap break 2 echo if [ "`awk -F ":" '/[^:]+:[^:]+:[0-9][0-9][0-9][0-9]+/ {print $1}' $T_PX/etc/passwd`" = "" ]; then gettext "No ordinary user has been registered yet." echo else gettext "Here are the already registered ordinary users:" echo awk -F ":" '/[^:]+:[^:]+:[0-9][0-9][0-9][0-9]+/ {print $1}' $T_PX/etc/passwd fi echo gettext "Press ENTER to continue." read dummy ) else break fi done fi