From daab09bfdd40aa87933588c419d4136e69d0067e Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Mon, 28 Oct 2019 14:51:49 +0100 Subject: [PATCH] only write /usr/sbin/policy-rc.d if /usr/sbin exists in the chroot --- mmdebstrap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index 61f546f..e9b2458 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -853,7 +853,8 @@ sub run_chroot(&$) { } # prevent daemons from starting - { + # the directory might not exist in custom variant, for example + if (-d "$options->{root}/usr/sbin/") { open my $fh, '>', "$options->{root}/usr/sbin/policy-rc.d" or error "cannot open policy-rc.d: $!"; print $fh "#!/bin/sh\n"; print $fh "exit 101\n";