EC2: metalog_add missing files from packages

The files
	/usr/local/etc/dhclient.conf
	/usr/local/etc/ssl/cert.pem
are created in EC2 images by installed packages, but are not being
registered in METALOG.  The reason for this is not immediately clear,
but may be related to the handling of "sample" files.

Reviewed by:	dch
MFC after:	5 minutes
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53035
This commit is contained in:
Colin Percival 2025-10-10 15:08:32 -07:00
parent 6081365c27
commit 2b0ffc0ee4
3 changed files with 12 additions and 0 deletions

View file

@ -36,5 +36,9 @@ vm_extra_pre_umount() {
# Standard FreeBSD network configuration
ec2_base_networking
# Add files from packages which weren't recorded in metalog
metalog_add_data ./usr/local/etc/dhclient.conf
metalog_add_data ./usr/local/etc/ssl/cert.pem
return 0
}

View file

@ -66,5 +66,9 @@ vm_extra_pre_umount() {
EOF
metalog_add_data ./boot/loader.conf
# Add files from packages which weren't recorded in metalog
metalog_add_data ./usr/local/etc/dhclient.conf
metalog_add_data ./usr/local/etc/ssl/cert.pem
return 0
}

View file

@ -49,5 +49,9 @@ vm_extra_pre_umount() {
# Standard FreeBSD network configuration
ec2_base_networking
# Add files from packages which weren't recorded in metalog
metalog_add_data ./usr/local/etc/dhclient.conf
metalog_add_data ./usr/local/etc/ssl/cert.pem
return 0
}