altboot: No longer use hutils.conf, only altboot.cfg. Adjust master-pw prompt.
authorMatthias Hentges <oe@hentges.net>
Sun, 7 Aug 2005 08:36:47 +0000 (08:36 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 7 Aug 2005 08:36:47 +0000 (08:36 +0000)
packages/altboot/altboot.bb
packages/altboot/files/altboot.func
packages/altboot/files/init.altboot

index e223414..568f528 100644 (file)
@@ -6,7 +6,7 @@ MAINTAINER = "Matthias 'CoreDump' Hentges  <oe@hentges.net>"
 LICENSE = "GPL"
  
 
-PR = "r3"
+PR = "r4"
 
 
 SRC_URI = "file://altboot-menu \
index 761c51f..260d0a9 100644 (file)
@@ -185,10 +185,11 @@ set_password() {
        mount -o remount,rw /
        if test -z "$MASTER_PASSWORD"
        then
-               echo -e "\nAltboot is a boot-manager which allows to boot from SD, CF and NFS\n\n"
-               echo -e "\nFor security reasons altboot requires a password\nto boot into single-user mode or init=/bin/sh"
-               echo -e "\nThis is *not* your root password! It is used by altboot alone!"
-               echo -e "Please enter a new master password:\n"
+               echo -e "\nAltboot is a boot-manager which allows to boot from SD, CF and NFS"
+               echo -e "\nFor security reasons altboot requires a password\nto boot into init=/bin/sh."
+               echo -e "${C_RED}This is *not* your root password! It is used by altboot alone!${C_RESET}"
+               echo -e "${C_BLUE}\nNote:\tThe password will be echoed to the screen\n\tand it will be asked twice for confirmation.${C_RESET}"
+               echo -e "\nPlease enter a new master password:\n"
 
                while true
                do
@@ -203,18 +204,14 @@ set_password() {
                                then
                                        crypt_pw="`echo "$junk1" | md5sum | awk '{print $1}'`"
                                        
-                                       if test -e /etc/hutils.conf
-                                       then
-                                               sed "/^MASTER_PASSWORD/s/\(.*\=\).*/\1\"$crypt_pw\"/" /etc/hutils.conf > /etc/hutils.conf_
-                                               mv /etc/hutils.conf_ /etc/hutils.conf
-                                               echo "Password changed."
-                                       fi
                                        if test -e /etc/altboot.cfg
                                        then
                                                sed "/^MASTER_PASSWORD/s/\(.*\=\).*/\1\"$crypt_pw\"/" /etc/altboot.cfg > /etc/altboot.cfg_
                                                mv /etc/altboot.cfg_ /etc/altboot.cfg
                                                MASTER_PASSWORD="$crypt_pw"
                                                echo "Password changed."
+                                       else
+                                               echo "/etc/altboot.cfg is missing, no password saved"
                                        fi
                                        
                                        break
index 28ae7b7..d9443c5 100644 (file)
@@ -10,15 +10,14 @@ test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.fun
 CURRENT_ENV="`set`"
 VERSION="0.0.2"
 
-# Set some defaults in case hutils.conf is missing
+# Set some defaults in case altboot.cfg is missing
 REAL_INIT="/sbin/init.sysvinit"
 
 # Read default runlevel from inittab
 INIT_RUNLEVEL="`cat /etc/inittab | sed -n "/^id\:/s/id\:\([0-9]\)\:.*$/\1/p"`"
 test -z "$INIT_RUNLEVEL" && INIT_RUNLEVEL=5
 
-test -e /etc/altboot.cfg && . /etc/altboot.cfg || echo "No altboot.cfg" > /dev/tty1
-test -e /etc/hutils.conf && . /etc/hutils.conf || echo "No hutils.conf" > /dev/tty1
+test -e /etc/altboot.cfg && . /etc/altboot.cfg || echo "WARNING: No altboot.cfg found! Check your installation of Altboot!" > /dev/tty1
 
 C_RED="\033[31m"
 C_BLUE="\033[34m"