From 7eb0851c592bd2fa40350b32518ed978278fcba3 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 23 Oct 2019 14:00:55 +0200 Subject: [PATCH] only remove policy-rc.d if it exists --- mmdebstrap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index 70a0994..8ba3740 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -876,7 +876,9 @@ sub run_chroot(&$) { 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: $!"; } - unlink "$options->{root}/usr/sbin/policy-rc.d" or error "cannot unlink policy-rc.d: $!"; + if (-e "$options->{root}/usr/sbin/policy-rc.d") { + unlink "$options->{root}/usr/sbin/policy-rc.d" or error "cannot unlink policy-rc.d: $!"; + } };