diff options
author | Daniel Baumann <daniel@debian.org> | 2013-04-09 05:54:22 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2013-04-09 05:54:22 +0200 |
commit | 6106e81b856f0247dceac096c778350593ac991f (patch) | |
tree | e7774f75ce861d36a9fdd44ccf81ddc6a473ec15 /scripts/build/chroot_sysv-rc | |
parent | 34dd4a6c704d44ed9d8994663d0855cf337f70f8 (diff) | |
download | vyos-live-build-6106e81b856f0247dceac096c778350593ac991f.tar.gz vyos-live-build-6106e81b856f0247dceac096c778350593ac991f.zip |
Using dpkg-divert for other diversions too to handle upgrades of the diverted stuff during build.
Diffstat (limited to 'scripts/build/chroot_sysv-rc')
-rwxr-xr-x | scripts/build/chroot_sysv-rc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/build/chroot_sysv-rc b/scripts/build/chroot_sysv-rc index ed78bdbcf..685775989 100755 --- a/scripts/build/chroot_sysv-rc +++ b/scripts/build/chroot_sysv-rc @@ -40,10 +40,10 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ -f chroot/usr/sbin/policy-rc.d ] + if [ -e chroot/usr/sbin/policy-rc.d ] then # Save policy-rc.d file - mv chroot/usr/sbin/policy-rc.d chroot/usr/sbin/policy-rc.d.orig + Chroot chroot dpkg-divert --rename --quiet --add /usr/sbin/policy-rc.d fi # Create policy-rc.d file @@ -68,13 +68,13 @@ EOF # Creating lock file Create_lockfile .lock - if [ -f chroot/usr/sbin/policy-rc.d.orig ] + # Remove custom policy-rc.d file + rm -f chroot/usr/sbin/policy-rc.d + + if [ -e chroot/usr/sbin/policy-rc.d.distrib ] then # Restore policy-rc.d file - mv chroot/usr/sbin/policy-rc.d.orig chroot/usr/sbin/policy-rc.d - else - # Remove policy-rc.d file - rm -f chroot/usr/sbin/policy-rc.d + Chroot chroot dpkg-divert --rename --quiet --remove /usr/sbin/policy-rc.d fi # Removing stage file |