Merge "Debian KS: Initialize default /etc/fstab"

This commit is contained in:
Zuul 2022-04-28 20:23:25 +00:00 committed by Gerrit Code Review
commit 87ada3e5a0

View File

@ -44,6 +44,7 @@
# Post - Kickstart Finalize Install UUID # Post - Kickstart Finalize Install UUID
# Post - Log Filesystem Setup # Post - Log Filesystem Setup
# Post Nochroot - Save Install scripts and Logs # Post Nochroot - Save Install scripts and Logs
# Post Nochroot - Set up /etc/fstab
# #
############################################################################ ############################################################################
# #
@ -1888,9 +1889,6 @@ INSTALL_UUID=`uuidgen`
echo ${INSTALL_UUID} > /var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid echo ${INSTALL_UUID} > /var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid
update_platform_conf "INSTALL_UUID=${INSTALL_UUID}" update_platform_conf "INSTALL_UUID=${INSTALL_UUID}"
# Create first_boot flag
touch /etc/platform/.first_boot
true true
%end %end
@ -2012,3 +2010,28 @@ fi
true true
%end %end
##########################################################################
%post --interpreter=/bin/bash --nochroot
HOOK_LABEL="post_nochroot"
. /tmp/lat/ks_functions.sh
# This needs to update all available ostree based rootfs
ilog "****************************************************"
ilog "*** Post Nochroot - Set up /etc/fstab ***"
ilog "****************************************************"
mkdir -p ${IMAGE_ROOTFS}/var/rootdirs/opt/platform-backup
mkdir -p ${IMAGE_ROOTFS}/var/rootdirs/scratch
mkdir -p ${IMAGE_ROOTFS}/var/log
echo -e "LABEL=platform_backup\t/var/rootdirs/opt/platform-backup\text4\tdefaults\t1 2" >> ${IMAGE_ROOTFS}/etc/fstab
echo -e "/dev/mapper/cgts--vg-scratch--lv\t/var/rootdirs/scratch\text4\tdefaults\t1 2" >> ${IMAGE_ROOTFS}/etc/fstab
echo -e "/dev/mapper/cgts--vg-log--lv\t/var/log\text4\tdefaults\t1 2" >> ${IMAGE_ROOTFS}/etc/fstab
# Create first_boot flag
touch ${IMAGE_ROOTFS}/etc/platform/.first_boot
true
%end