Open noelmcloughlin opened 5 years ago
How about this fix which stops Debian interfering with systemd.
### stop debian interference with services (https://wiki.debian.org/chroot)
if [ -f "/usr/bin/apt-get" ]; then
cat > /usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
From official documentation @ https://wiki.debian.org/chroot :
Create a /usr/sbin/policy-rc.d file IN THE CHROOT so that dpkg won't start daemons unless desired. This example prevents all daemons from being started in the chroot.
chroot /srv/chroot/stretch
cat > ./usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
chmod a+x ./usr/sbin/policy-rc.d
Tracking https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/1818431