Fixing login scenario

This commit is contained in:
Anton Hvornum 2019-04-14 17:27:19 +02:00
parent 968fad8f94
commit 33610debef
1 changed files with 2 additions and 2 deletions

View File

@ -683,8 +683,8 @@ if __name__ == '__main__':
## since we set the password as the last step. And then the command itself which will be executed by looking for:
## [root@<hostname> ~]#
o = b''.join(sys_command('/usr/bin/systemd-nspawn -D /mnt -b --machine temporary', opts={'triggers' : {
bytes(f'{args["hostname"]} login', 'UTF-8') : b'root\n',
b'Password' : bytes(args['password']+'\n', 'UTF-8'),
bytes(f'login:', 'UTF-8') : b'root\n', # {args["hostname"]} login:
#b'Password' : bytes(args['password']+'\n', 'UTF-8'),
bytes(f'[root@{args["hostname"]} ~]#', 'UTF-8') : bytes(command+'\n', 'UTF-8'),
}, **opts}).exec())