diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2013-03-11 09:49:07 +0100 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2013-05-06 14:50:07 +0200 |
commit | 5a00aa44827cd477e13470b4ce417b7b6fff62f9 (patch) | |
tree | 558cdaf7913c1bb38ff737f96f05ad42c406649e /scripts/build/chroot_sysv-rc | |
parent | 20f042f923d25772cb87515a184308e2d2dec084 (diff) | |
download | vyos-live-build-5a00aa44827cd477e13470b4ce417b7b6fff62f9.tar.gz vyos-live-build-5a00aa44827cd477e13470b4ce417b7b6fff62f9.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 247290e61..4dea100d2 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 |