2013-02-13 22:16:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
[ -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
|
|
|
|
|
2013-11-17 03:42:17 +00:00
|
|
|
if [ -f $TARGET_ROOT/sbin/initctl ]
|
|
|
|
then
|
|
|
|
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
|
|
|
|
|
|
|
sudo mv $TARGET_ROOT/usr/sbin/invoke-rc.d $TARGET_ROOT/usr/sbin/invoke-rc.d.REAL
|
|
|
|
sudo dd of=$TARGET_ROOT/usr/sbin/invoke-rc.d <<EOF
|
|
|
|
#!/bin/sh
|
|
|
|
echo "invoke-rc.d (tripleo 1.0)"
|
2013-04-18 16:35:38 +00:00
|
|
|
echo "Warning: Fake invoke-rc.d called, doing nothing"
|
2013-02-13 22:16:00 +00:00
|
|
|
EOF
|
|
|
|
sudo chmod 755 $TARGET_ROOT/usr/sbin/invoke-rc.d
|