git: 1614823a499a - stable/13 - release/oci.conf: add missing vm_extra_pre_umount() steps

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 22 Jan 2024 14:33:38 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=1614823a499aa7a46aa8ab4ed06a6d1b71e0bdd9

commit 1614823a499aa7a46aa8ab4ed06a6d1b71e0bdd9
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-05-24 15:45:29 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-01-22 14:33:06 +0000

    release/oci.conf: add missing vm_extra_pre_umount() steps
    
    vm.subr's default vm_extra_pre_umount removes /qemu and
    /etc/resolv.conf.  When vm_extra_pre_umount is overridden these steps
    need to be performed in the cloud-specific conf file.
    
    PR:             271602
    Reviewed by:    dch, lwhsu
    Event:          Kitchener-Waterloo Hackathon 202305
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D40257
    
    (cherry picked from commit ae60012e46ecfe59a3506b903e685b6a3347807b)
---
 release/tools/oci.conf | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/release/tools/oci.conf b/release/tools/oci.conf
index 7260cd24defd..47231d65d79b 100644
--- a/release/tools/oci.conf
+++ b/release/tools/oci.conf
@@ -90,5 +90,10 @@ EOF
 
 	touch ${DESTDIR}/firstboot
 
+	if ! [ -z "${QEMUSTATIC}" ]; then
+		rm -f ${DESTDIR}/${EMULATOR}
+	fi
+	rm -f ${DESTDIR}/etc/resolv.conf
+
 	return 0
 }