From bf79569d00002b426dbf55ccbb30d4e952dae283 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Mon, 27 Apr 2020 16:02:30 +0200 Subject: [PATCH] Removed unused jail_run_v2 --- jail.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/jail.py b/jail.py index 605336d..006d41a 100644 --- a/jail.py +++ b/jail.py @@ -82,15 +82,6 @@ def jail_create(path, command, env, mounts, hostname=None): return name -def jail_run_v2(path, command, env, mounts): - name = os.path.split(path)[-1] - command = gen_env_command(command, env) - jail_create(path, None, None, mounts) - subprocess.check_output([ 'jail', '-c', name ]) - subprocess.run([ 'jexec', name, '/bin/sh', '-c', command ]) - subprocess.check_output([ 'jail', '-r', name ]) - - def get_jid(path): data = json.loads(subprocess.check_output(['jls', '--libxo=json'])) lst = data['jail-information']['jail']