bsdinstall: fix root password prompt with backslashes
Use "read -r" to set the root password in "bsdinstall rootpass" to prevent issues with passwords containing one or more backslash characters. PR: 294781 Discussed with: tuexen, crest Approved by: khorben MFC after: 3 days Event: Wiesbaden Hackathon 202604
This commit is contained in:
@@ -103,8 +103,8 @@ $errormsg" \
|
|||||||
exec 5>&-
|
exec 5>&-
|
||||||
[ $res -eq $BSDDIALOG_OK ] || exit 0
|
[ $res -eq $BSDDIALOG_OK ] || exit 0
|
||||||
|
|
||||||
echo -n "$output" | (read password1
|
echo -n "$output" | (read -r password1
|
||||||
read password2
|
read -r password2
|
||||||
[ -n "$password1" -o -n "$password2" ] || exit 62
|
[ -n "$password1" -o -n "$password2" ] || exit 62
|
||||||
[ "$password1" = "$password2" ] || exit 63
|
[ "$password1" = "$password2" ] || exit 63
|
||||||
echo "$password1" | chroot $BSDINSTALL_CHROOT \
|
echo "$password1" | chroot $BSDINSTALL_CHROOT \
|
||||||
|
|||||||
Reference in New Issue
Block a user