summaryrefslogtreecommitdiff
path: root/packages/altboot/files
diff options
context:
space:
mode:
authorMatthias Hentges <oe@hentges.net>2005-08-07 08:36:47 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-07 08:36:47 +0000
commit18333dda898cfa195ff4fa3fa1b2535eceb7d16e (patch)
tree3c1b19acbb9d46ebf0955ac14a6d34a23c983db2 /packages/altboot/files
parenta8dbb70c70b53d86d5391dc66e84a3cb563fffce (diff)
altboot: No longer use hutils.conf, only altboot.cfg. Adjust master-pw prompt.
Diffstat (limited to 'packages/altboot/files')
-rw-r--r--packages/altboot/files/altboot.func17
-rw-r--r--packages/altboot/files/init.altboot5
2 files changed, 9 insertions, 13 deletions
diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func
index 761c51f9b4..260d0a977b 100644
--- a/packages/altboot/files/altboot.func
+++ b/packages/altboot/files/altboot.func
@@ -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
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot
index 28ae7b7042..d9443c568e 100644
--- a/packages/altboot/files/init.altboot
+++ b/packages/altboot/files/init.altboot
@@ -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"