diff options
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 |