2013-02-13 22:16:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2014-04-03 02:24:15 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
2013-02-13 22:16:00 +00:00
|
|
|
|
|
|
|
[ -n "$TARGET_ROOT" ]
|
|
|
|
|
|
|
|
# Prevent package installs from starting daemons
|
|
|
|
sudo mv $TARGET_ROOT/sbin/start-stop-daemon $TARGET_ROOT/sbin/start-stop-daemon.REAL
|
|
|
|
sudo dd of=$TARGET_ROOT/sbin/start-stop-daemon <<EOF
|
|
|
|
#!/bin/sh
|
|
|
|
echo
|
|
|
|
echo "Warning: Fake start-stop-daemon called, doing nothing"
|
|
|
|
EOF
|
|
|
|
sudo chmod 755 $TARGET_ROOT/sbin/start-stop-daemon
|
|
|
|
|
2014-07-01 09:27:41 +00:00
|
|
|
if [ -f $TARGET_ROOT/sbin/initctl ]; then
|
2013-11-17 03:42:17 +00:00
|
|
|
sudo mv $TARGET_ROOT/sbin/initctl $TARGET_ROOT/sbin/initctl.REAL
|
|
|
|
sudo dd of=$TARGET_ROOT/sbin/initctl <<EOF
|
2013-02-13 22:16:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
echo "initctl (tripleo 1.0)"
|
|
|
|
echo "Warning: Fake initctl called, doing nothing"
|
|
|
|
EOF
|
2013-11-17 03:42:17 +00:00
|
|
|
sudo chmod 755 $TARGET_ROOT/sbin/initctl
|
|
|
|
fi
|
2013-02-13 22:16:00 +00:00
|
|
|
|
2014-03-26 13:24:51 +00:00
|
|
|
sudo dd of=$TARGET_ROOT/usr/sbin/policy-rc.d <<EOF
|
2013-02-13 22:16:00 +00:00
|
|
|
#!/bin/sh
|
2014-03-26 13:24:51 +00:00
|
|
|
# 101 Action not allowed. The requested action will not be performed because
|
|
|
|
# of runlevel or local policy constraints.
|
|
|
|
exit 101
|
2013-02-13 22:16:00 +00:00
|
|
|
EOF
|
2014-03-26 13:24:51 +00:00
|
|
|
sudo chmod 755 $TARGET_ROOT/usr/sbin/policy-rc.d
|