diskimage-builder/diskimage_builder/elements/dpkg/cleanup.d/40-unblock-daemons

18 lines
364 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
[ -n "$TARGET_ROOT" ]
sudo mv $TARGET_ROOT/sbin/start-stop-daemon.REAL $TARGET_ROOT/sbin/start-stop-daemon
if [ -f $TARGET_ROOT/sbin/initctl.REAL ]; then
sudo mv $TARGET_ROOT/sbin/initctl.REAL $TARGET_ROOT/sbin/initctl
fi
sudo rm $TARGET_ROOT/usr/sbin/policy-rc.d