|
@@ -12,7 +12,7 @@ def jail_run(path, command): |
|
|
finally:
|
|
|
finally:
|
|
|
subprocess.run(['umount', os.path.join(path, 'dev')])
|
|
|
subprocess.run(['umount', os.path.join(path, 'dev')])
|
|
|
if res.returncode != 0:
|
|
|
if res.returncode != 0:
|
|
|
subprocess.run(['umount', os.path.join(path, 'dev')])
|
|
|
|
|
|
|
|
|
# subprocess.run(['umount', os.path.join(path, 'dev')])
|
|
|
raise RuntimeError('Command failed')
|
|
|
raise RuntimeError('Command failed')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -30,6 +30,6 @@ def command_jail_run(args): |
|
|
jail_run(zfs_mountpoint(name), args.command)
|
|
|
jail_run(zfs_mountpoint(name), args.command)
|
|
|
# subprocess.check_output(['jail', '-c', 'interface=lo1', 'ip4.addr=127.0.1.0', 'path=' + zfs_mountpoint(name), 'command', command])
|
|
|
# subprocess.check_output(['jail', '-c', 'interface=lo1', 'ip4.addr=127.0.1.0', 'path=' + zfs_mountpoint(name), 'command', command])
|
|
|
finally:
|
|
|
finally:
|
|
|
subprocess.run(['umount', zfs_mountpoint(name) + '/dev'])
|
|
|
|
|
|
|
|
|
# subprocess.run(['umount', zfs_mountpoint(name) + '/dev'])
|
|
|
zfs_run(['zfs', 'destroy', '-f', name])
|
|
|
zfs_run(['zfs', 'destroy', '-f', name])
|
|
|
# raise
|
|
|
# raise
|