Properly pass exit code from exec
This commit is contained in:
parent
3940c87fdf
commit
a5d53c0a7b
5
jlmkr.py
5
jlmkr.py
|
@ -223,6 +223,7 @@ def exec_jail(jail_name, cmd, args):
|
||||||
"""
|
"""
|
||||||
Execute a command in the jail with given name.
|
Execute a command in the jail with given name.
|
||||||
"""
|
"""
|
||||||
|
sys.exit(
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
"systemd-run",
|
"systemd-run",
|
||||||
|
@ -235,8 +236,8 @@ def exec_jail(jail_name, cmd, args):
|
||||||
"--service-type=exec",
|
"--service-type=exec",
|
||||||
cmd,
|
cmd,
|
||||||
]
|
]
|
||||||
+ args,
|
+ args
|
||||||
check=True,
|
).returncode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue