Don't run init scripts from installation scripts
This commit is contained in:
parent
6dabc61089
commit
ad5af964fc
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh -eu
|
||||||
|
# tweak-init-policy -- for use in a Docker image
|
||||||
|
# Copyright (C) 2017 Olaf Meeuwissen
|
||||||
|
#
|
||||||
|
# License: GPL-3.0+
|
||||||
|
|
||||||
|
cat > /usr/sbin/policy-rc.d.docker <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
exit 101 # action forbidden by policy
|
||||||
|
EOF
|
||||||
|
chmod 0755 /usr/sbin/policy-rc.d.docker
|
||||||
|
|
||||||
|
update-alternatives --quiet --install /usr/sbin/policy-rc.d \
|
||||||
|
policy-rc.d /usr/sbin/policy-rc.d.docker 100
|
||||||
|
|
||||||
|
dpkg-divert --quiet --local --add /sbin/initctl
|
||||||
|
ln -fs /bin/true /sbin/initctl
|
||||||
|
|
||||||
|
rm $0
|
||||||
Loading…
Reference in New Issue