diff --git a/elements/dpkg/cleanup.d/40-unblock-daemons b/elements/dpkg/cleanup.d/40-unblock-daemons index a3095a17..b30f4619 100755 --- a/elements/dpkg/cleanup.d/40-unblock-daemons +++ b/elements/dpkg/cleanup.d/40-unblock-daemons @@ -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 - - diff --git a/elements/dpkg/root.d/99-block-daemons b/elements/dpkg/root.d/99-block-daemons index feb5a4a3..5594651c 100755 --- a/elements/dpkg/root.d/99-block-daemons +++ b/elements/dpkg/root.d/99-block-daemons @@ -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 <