only remove policy-rc.d if it exists

This commit is contained in:
Johannes 'josch' Schauer 2019-10-23 14:00:55 +02:00
parent 1f15f690e7
commit 7eb0851c59
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -876,7 +876,9 @@ sub run_chroot(&$) {
if (-e "$options->{root}/sbin/start-stop-daemon.REAL") { if (-e "$options->{root}/sbin/start-stop-daemon.REAL") {
move("$options->{root}/sbin/start-stop-daemon.REAL", "$options->{root}/sbin/start-stop-daemon") or error "cannot move start-stop-daemon: $!"; move("$options->{root}/sbin/start-stop-daemon.REAL", "$options->{root}/sbin/start-stop-daemon") or error "cannot move start-stop-daemon: $!";
} }
if (-e "$options->{root}/usr/sbin/policy-rc.d") {
unlink "$options->{root}/usr/sbin/policy-rc.d" or error "cannot unlink policy-rc.d: $!"; unlink "$options->{root}/usr/sbin/policy-rc.d" or error "cannot unlink policy-rc.d: $!";
}
}; };