Merge "Don't block the upstart daemon if it doesn't exist"

This commit is contained in:
Jenkins 2013-11-18 09:35:03 +00:00 committed by Gerrit Code Review
commit 670f1f7312
2 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,8 @@ set -e
[ -n "$TARGET_ROOT" ]
sudo mv $TARGET_ROOT/sbin/start-stop-daemon.REAL $TARGET_ROOT/sbin/start-stop-daemon
sudo mv $TARGET_ROOT/sbin/initctl.REAL $TARGET_ROOT/sbin/initctl
if [ -f $TARGET_ROOT/sbin/initctl.REAL ]
then
sudo mv $TARGET_ROOT/sbin/initctl.REAL $TARGET_ROOT/sbin/initctl
fi
sudo mv $TARGET_ROOT/usr/sbin/invoke-rc.d.REAL $TARGET_ROOT/usr/sbin/invoke-rc.d

View File

@ -13,13 +13,16 @@ echo "Warning: Fake start-stop-daemon called, doing nothing"
EOF
sudo chmod 755 $TARGET_ROOT/sbin/start-stop-daemon
sudo mv $TARGET_ROOT/sbin/initctl $TARGET_ROOT/sbin/initctl.REAL
sudo dd of=$TARGET_ROOT/sbin/initctl <<EOF
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
#!/bin/sh
echo "initctl (tripleo 1.0)"
echo "Warning: Fake initctl called, doing nothing"
EOF
sudo chmod 755 $TARGET_ROOT/sbin/initctl
sudo chmod 755 $TARGET_ROOT/sbin/initctl
fi
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