add --skip=cleanup/reproducible/machine-id
This commit is contained in:
parent
87b9b385b3
commit
6e4ed4a049
1 changed files with 10 additions and 5 deletions
15
mmdebstrap
15
mmdebstrap
|
@ -4190,11 +4190,16 @@ sub run_cleanup() {
|
|||
# this file if possible. Having an empty file in place is useful
|
||||
# because it allows a temporary file to be bind-mounted over the
|
||||
# real file, in case the image is used read-only.
|
||||
unlink "$options->{root}/etc/machine-id"
|
||||
or error "cannot unlink /etc/machine-id: $!";
|
||||
open my $fh, '>', "$options->{root}/etc/machine-id"
|
||||
or error "failed to open(): $!";
|
||||
close $fh;
|
||||
if (any { $_ eq 'cleanup/reproducible/machine-id' }
|
||||
@{ $options->{skip} }) {
|
||||
info "skipping cleanup/reproducible/machine-id as requested";
|
||||
} else {
|
||||
unlink "$options->{root}/etc/machine-id"
|
||||
or error "cannot unlink /etc/machine-id: $!";
|
||||
open my $fh, '>', "$options->{root}/etc/machine-id"
|
||||
or error "failed to open(): $!";
|
||||
close $fh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue