forked from josch/mmdebstrap
only write /usr/sbin/policy-rc.d if /usr/sbin exists in the chroot
This commit is contained in:
parent
c5a96736ef
commit
daab09bfdd
1 changed files with 2 additions and 1 deletions
|
@ -853,7 +853,8 @@ sub run_chroot(&$) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# prevent daemons from starting
|
# 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: $!";
|
open my $fh, '>', "$options->{root}/usr/sbin/policy-rc.d" or error "cannot open policy-rc.d: $!";
|
||||||
print $fh "#!/bin/sh\n";
|
print $fh "#!/bin/sh\n";
|
||||||
print $fh "exit 101\n";
|
print $fh "exit 101\n";
|
||||||
|
|
Loading…
Reference in a new issue