Skip to content
Snippets Groups Projects
Commit cac33624 authored by Sebastien Luttringer's avatar Sebastien Luttringer
Browse files

policy-rc.d must exit 101 in chroot

parent 44c0d26a
No related branches found
No related tags found
No related merge requests found
......@@ -375,9 +375,9 @@ def prepare_chroot(path, mount=True):
# create a chroot header
try: open(os.path.join(path, "etc/debian_chroot"), "w").write("CHROOT")
except: pass
# fake policy-rc.d
# fake policy-rc.d. It must exit 101, it's an expected exitcode.
policy_path = os.path.join(path, "usr/sbin/policy-rc.d")
try: open(policy_path, "w").write("#!/bin/bash\nexit 42\n")
try: open(policy_path, "w").write("#!/bin/bash\nexit 101\n")
except: pass
# policy-rc.d needs to be executable
chrights(policy_path, mode=0755)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment