diff options
Diffstat (limited to 'scripts/build/chroot_dpkg')
-rwxr-xr-x | scripts/build/chroot_dpkg | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg index b199cdf17..07ef9667d 100755 --- a/scripts/build/chroot_dpkg +++ b/scripts/build/chroot_dpkg @@ -40,10 +40,8 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Save start-stop-daemon program - mv chroot/sbin/start-stop-daemon chroot/sbin/start-stop-daemon.orig - - # Create start-stop-daemon program + # Create custom start-stop-daemon program + Chroot chroot dpkg-divert --rename --quiet --add /sbin/start-stop-daemon cat > chroot/sbin/start-stop-daemon << EOF #!/bin/sh @@ -103,11 +101,9 @@ EOF rmdir --ignore-fail-on-non-empty /var/state/samhain || true fi - # Restore start-stop-daemon program - if [ -e chroot/sbin/start-stop-daemon.orig ] - then - mv chroot/sbin/start-stop-daemon.orig chroot/sbin/start-stop-daemon - fi + # Remove custom start-stop-daemon program + rm -f chroot/sbin/start-stop-daemon + Chroot chroot dpkg-divert --rename --quiet --remove /sbin/start-stop-daemon # Remove dpkg sync configuration rm -f chroot/etc/dpkg/dpkg.cfg.d/live-build |