From d4cb0656396b12718f67f045e548d6ebe9ffef85 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Mon, 10 Oct 2022 15:00:58 +0200 Subject: [PATCH] Write an empty /etc/machine-id instead of writing 'uninitialized'. Writing "uninitialized" instructs systemd to run units with ConditionFirstBoot=yes which should only be done by tools that know how to correctly set up such units. Debian-Bug: #1021478 --- mmdebstrap | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index 0c14962..1230ff4 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -3002,7 +3002,6 @@ sub run_cleanup() { or error "cannot unlink /etc/machine-id: $!"; open my $fh, '>', "$options->{root}/etc/machine-id" or error "failed to open(): $!"; - print $fh "uninitialized\n"; close $fh; } } @@ -6823,7 +6822,7 @@ Performs cleanup tasks, unless B<--skip=cleanup> is used: =item * Remove all files that were put into the chroot for setup purposes, like F, the temporary apt config and the qemu-user-static binary. This can be disabled using B<--skip=cleanup/mmdebstrap>. -=item * Remove files that make the result unreproducible and write "uninitialized" to /etc/machine-id if it exists. This can be disabled using B<--skip=cleanup/reproducible>. Note that this will not remove files that make the result unreproducible on machines with differing F or F. Use a B<--customize-hook> to make those two files reproducible across multiple hosts. See section C for more information. The following files will be removed: +=item * Remove files that make the result unreproducible and write the empty string to /etc/machine-id if it exists. This can be disabled using B<--skip=cleanup/reproducible>. Note that this will not remove files that make the result unreproducible on machines with differing F or F. Use a B<--customize-hook> to make those two files reproducible across multiple hosts. See section C for more information. The following files will be removed: =over 4