Forgot to send the options as actual options.

This commit is contained in:
Anton Hvornum 2019-04-10 18:18:47 +02:00
parent 1726a597aa
commit 434603a008
1 changed files with 3 additions and 3 deletions

View File

@ -542,15 +542,15 @@ if __name__ == '__main__':
o = run("cd /mnt; mount -t proc /proc proc") o = run("cd /mnt; mount -t proc /proc proc")
o = run("cd /mnt; mount --make-rslave --rbind /sys sys") o = run("cd /mnt; mount --make-rslave --rbind /sys sys")
o = run("cd /mnt; mount --make-rslave --rbind /dev dev") o = run("cd /mnt; mount --make-rslave --rbind /dev dev")
o = run('chroot /mnt /bin/bash -c "{c}"'.format(c=command)) o = run('chroot /mnt /bin/bash -c "{c}"'.format(c=command), opts=opts)
o = run("cd /mnt; umount -R dev") o = run("cd /mnt; umount -R dev")
o = run("cd /mnt; umount -R sys") o = run("cd /mnt; umount -R sys")
o = run("cd /mnt; umount -R proc") o = run("cd /mnt; umount -R proc")
else: else:
if 'boot' in opts and opts['boot']: if 'boot' in opts and opts['boot']:
o = run('systemd-nspawn -D /mnt -b --machine temporary {c}'.format(c=command), opts) o = run('systemd-nspawn -D /mnt -b --machine temporary {c}'.format(c=command), opts=opts)
else: else:
o = run('systemd-nspawn -D /mnt --machine temporary {c}'.format(c=command), opts) o = run('systemd-nspawn -D /mnt --machine temporary {c}'.format(c=command), opts=opts)
if type(conf[title][raw_command]) == bytes and len(conf[title][raw_command]) and not conf[title][raw_command] in o: if type(conf[title][raw_command]) == bytes and len(conf[title][raw_command]) and not conf[title][raw_command] in o:
print('[W] Post install command failed: {}'.format(o.decode('UTF-8'))) print('[W] Post install command failed: {}'.format(o.decode('UTF-8')))
#print(o) #print(o)