lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master db57734 2/5: Prevent daemons from starting; a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master db57734 2/5: Prevent daemons from starting; avoid 'ischroot' defect (VZ)
Date: Wed, 5 Oct 2016 23:00:07 +0000 (UTC)

branch: master
commit db57734cc01042420d4978de821b8f21ab02a60b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Prevent daemons from starting; avoid 'ischroot' defect (VZ)
    
    See:
      http://lists.nongnu.org/archive/html/lmi/2016-09/msg00022.html
---
 README.schroot |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/README.schroot b/README.schroot
index bb9fede..4254041 100644
--- a/README.schroot
+++ b/README.schroot
@@ -63,6 +63,20 @@ schroot --chroot=cross-lmi --user=root --directory=/
 
 dpkg --add-architecture i386
 
+# Prevent daemons from starting in the chroot; work around an
+# 'ischroot' defect. See:
+#   https://wiki.debian.org/chroot#Configuration
+
+cat >/usr/sbin/policy-rc.d <<EOF
+#!/bin/sh
+exit 101
+EOF
+
+chmod a+x /usr/sbin/policy-rc.d
+
+dpkg-divert --divert /usr/bin/ischroot.debianutils --rename /usr/bin/ischroot
+ln -s /bin/true /usr/bin/ischroot
+
 apt-get update
 apt-get install g++-mingw-w64-i686 automake libtool make pkg-config \
  git zsh bzip2 unzip sudo wine



reply via email to

[Prev in Thread] Current Thread [Next in Thread]