mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
'change root pw to real dialog'
This commit is contained in:
parent
5753181492
commit
e96b0a6cda
1 changed files with 18 additions and 4 deletions
|
@ -1115,9 +1115,9 @@ _luks()
|
||||||
done
|
done
|
||||||
LUKSPASSPHRASE=""
|
LUKSPASSPHRASE=""
|
||||||
while [ "${LUKSPASSPHRASE}" = "" ]; do
|
while [ "${LUKSPASSPHRASE}" = "" ]; do
|
||||||
DIALOG --insecure --passwordbox "Enter passphrase below:" 0 0 2>$ANSWER || return 1
|
DIALOG --insecure --passwordbox "Enter passphrase:" 0 0 2>$ANSWER || return 1
|
||||||
LUKSPASS=$(cat $ANSWER)
|
LUKSPASS=$(cat $ANSWER)
|
||||||
DIALOG --insecure --passwordbox "Retype passphrase below:" 0 0 2>$ANSWER || return 1
|
DIALOG --insecure --passwordbox "Retype passphrase:" 0 0 2>$ANSWER || return 1
|
||||||
LUKSPASS2=$(cat $ANSWER)
|
LUKSPASS2=$(cat $ANSWER)
|
||||||
if [ "$LUKSPASS" = "$LUKSPASS2" ]; then
|
if [ "$LUKSPASS" = "$LUKSPASS2" ]; then
|
||||||
LUKSPASSPHRASE=$LUKSPASS
|
LUKSPASSPHRASE=$LUKSPASS
|
||||||
|
@ -2723,9 +2723,23 @@ configure_system()
|
||||||
done
|
done
|
||||||
$EDITOR ${DESTDIR}${FILE}
|
$EDITOR ${DESTDIR}${FILE}
|
||||||
elif [ "$FILE" = "Root-Password" ]; then # non-file
|
elif [ "$FILE" = "Root-Password" ]; then # non-file
|
||||||
while true; do
|
PASSWORD=""
|
||||||
chroot ${DESTDIR} passwd root && break
|
while [ "${PASSWORD}" = "" ]; do
|
||||||
|
DIALOG --insecure --passwordbox "Enter root password:" 0 0 2>$ANSWER || return 1
|
||||||
|
PASS=$(cat $ANSWER)
|
||||||
|
DIALOG --insecure --passwordbox "Retype root password:" 0 0 2>$ANSWER || return 1
|
||||||
|
PASS2=$(cat $ANSWER)
|
||||||
|
if [ "$PASS" = "$PASS2" ]; then
|
||||||
|
PASSWORD=$PASS
|
||||||
|
echo $PASSWORD > /tmp/.password
|
||||||
|
echo $PASSWORD > /tmp/.password
|
||||||
|
PASSWORD=/tmp/.password
|
||||||
|
else
|
||||||
|
DIALOG --msgbox "Password didn't match, please enter again." 0 0
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
chroot ${DESTDIR} passwd root < /tmp/.password
|
||||||
|
rm /tmp/.password
|
||||||
elif [ "$FILE" = "Pacman-Mirror" ]; then # non-file
|
elif [ "$FILE" = "Pacman-Mirror" ]; then # non-file
|
||||||
do_pacmanmirror
|
do_pacmanmirror
|
||||||
else #regular file
|
else #regular file
|
||||||
|
|
Loading…
Reference in a new issue