Password being inserted causes the subsystem to wait for it forever. Only add it back if we set a root password earlier than this

This commit is contained in:
Anton Hvornum 2019-06-20 21:12:46 +00:00
parent ad852b363b
commit 265a4ff73d
1 changed files with 1 additions and 1 deletions

View File

@ -832,7 +832,7 @@ if __name__ == '__main__':
## [root@<hostname> ~]#
o = b''.join(sys_command('/usr/bin/systemd-nspawn -D /mnt -b --machine temporary', opts={'triggers' : {
bytes(f'login:', 'UTF-8') : b'root\n',
b'Password:' : bytes(args['password']+'\n', 'UTF-8'),
#b'Password:' : bytes(args['password']+'\n', 'UTF-8'),
bytes(f'[root@{args["hostname"]} ~]#', 'UTF-8') : bytes(command+'\n', 'UTF-8'),
}, **opts}).exec())