only write /usr/sbin/policy-rc.d if /usr/sbin exists in the chroot

pull/1/head
parent c5a96736ef
commit daab09bfdd
Signed by: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -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";

Loading…
Cancel
Save