commit:     40bb07e9456e1583e8e4328c07ccf894b4792d92
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  6 20:40:57 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Oct  6 20:40:57 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=40bb07e9

Minor fixes to qcow2 creation script

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 targets/support/create-qcow2.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/targets/support/create-qcow2.sh b/targets/support/create-qcow2.sh
index d54691a8..7d7dd2e7 100755
--- a/targets/support/create-qcow2.sh
+++ b/targets/support/create-qcow2.sh
@@ -73,16 +73,23 @@ mount ${mypartroot} "${mymountpoint}" || die "Could not 
mount root partition"
 mkdir -p "${mymountpoint}"/boot || die "Could not create boot mount point"
 mount ${mypartefi} "${mymountpoint}/boot" || die "Could not mount boot 
partition"
 
-# copy contents in
-cp -a "${clst_target_path}"/* "${my_mountpoint}/"
+# copy contents in - do we need extra preserve steps? rsync? tar?
+cp -a "${clst_target_path}"/* "${mymountpoint}/" || die "Could not copy 
content into mounted image"
 
 # at this point we have a working system
 
+# create a CONTENTS.gz file
+pushd "${mymountpoint}" || die "Could not cd into mountpoint"
+find . > "${1}.CONTENTS" || die "Could not list files in mountpoint"
+popd || die "Could not cd out of mountpoint"
+gzip "${1}.CONTENTS" || die "Could not compress file list"
+
 # note: the following must already have been done by the stage2:
 # - rudimentary configuration
 # - installation of cloud-init
 # - installation of kernel
 # - installation of fallback efi loader
+# - enabling of services
 # luckily efi requires no image magic, just regular files...
 
 # unmount things

Reply via email to