From cac3362462bebe41e3ec526373ffec547b433c2e Mon Sep 17 00:00:00 2001 From: Sebastien Luttringer <sebastien.luttringer@smartjog.com> Date: Fri, 4 Nov 2011 11:58:05 +0100 Subject: [PATCH] policy-rc.d must exit 101 in chroot --- installsystems/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installsystems/tools.py b/installsystems/tools.py index 6a6f910..4e54fbb 100644 --- a/installsystems/tools.py +++ b/installsystems/tools.py @@ -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) -- GitLab