install --ondev: don't ask for user password (MR 1954)
With postmarketos-ondev 0.2.0, the password is set in the on-device installer.
This commit is contained in:
parent
90f57bbbcc
commit
324ea788ba
|
@ -190,18 +190,19 @@ def setup_login(args):
|
||||||
Loop until the password for user has been set successfully, and disable root
|
Loop until the password for user has been set successfully, and disable root
|
||||||
login.
|
login.
|
||||||
"""
|
"""
|
||||||
# User password
|
|
||||||
logging.info(" *** SET LOGIN PASSWORD FOR: '" + args.user + "' ***")
|
|
||||||
suffix = "rootfs_" + args.device
|
suffix = "rootfs_" + args.device
|
||||||
while True:
|
if not args.on_device_installer:
|
||||||
try:
|
# User password
|
||||||
pmb.chroot.root(args, ["passwd", args.user], suffix,
|
logging.info(" *** SET LOGIN PASSWORD FOR: '" + args.user + "' ***")
|
||||||
output="interactive")
|
while True:
|
||||||
break
|
try:
|
||||||
except RuntimeError:
|
pmb.chroot.root(args, ["passwd", args.user], suffix,
|
||||||
logging.info("WARNING: Failed to set the password. Try it"
|
output="interactive")
|
||||||
" one more time.")
|
break
|
||||||
pass
|
except RuntimeError:
|
||||||
|
logging.info("WARNING: Failed to set the password. Try it"
|
||||||
|
" one more time.")
|
||||||
|
pass
|
||||||
|
|
||||||
# Disable root login
|
# Disable root login
|
||||||
pmb.chroot.root(args, ["passwd", "-l", "root"], suffix)
|
pmb.chroot.root(args, ["passwd", "-l", "root"], suffix)
|
||||||
|
|
Loading…
Reference in New Issue