From 6106e81b856f0247dceac096c778350593ac991f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 9 Apr 2013 05:54:22 +0200 Subject: Using dpkg-divert for other diversions too to handle upgrades of the diverted stuff during build. --- scripts/build/chroot_dpkg | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'scripts/build/chroot_dpkg') diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg index b9fa840e0..e16eadc43 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 ${LB_ROOT_COMMAND} 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 -- cgit v1.2.3