+
+ if [ -n "$PASSWD" ] ; then
+ chpass_options=""
+ if chpasswd --help 2>&1 | grep -q -- '-m,' ; then
+ chpass_options="-m"
+ fi
+
+ echo "$localuser:$PASSWD" | chpasswd $chpass_options
+ echo "root:$PASSWD" | chpasswd $chpass_options
+
+ eindent
+ ewarn "Warning: please change the password for root and user $localuser as soon as possible!"
+ eoutdent
+ fi
+
+fi
+
+if checkbootparam 'encpasswd' >>$DEBUG 2>&1; then
+ local PASSWD
+ PASSWD="$(getbootparam 'encpasswd' 2>>$DEBUG)"
+
+ if [ -z "$PASSWD" ] ; then
+ eerror "No hashed password found, can not set password."
+ eend 1
+ return
+ fi
+
+ config_userlocal
+ einfo "Bootoption encpasswd found, trying to set hashed password for root and user $localuser"
+ [ -z "$localuser" ] && eend 1
+
+ if [ -n "$PASSWD" ] ; then
+ chpass_options="-e"
+
+ echo "$localuser:$PASSWD" | chpasswd $chpass_options
+ echo "root:$PASSWD" | chpasswd $chpass_options
+
+ eindent
+ ewarn "Warning: please change the password for root and user $localuser as soon as possible!"
+ eoutdent
+ fi
+