integ/ostree/initramfs-ostree/debian/patches/0002-debian-Copy-sysroot-var-log-to-LVM-volume.patch
Robert Church 4dc4fb11a7 debian: Remove installer code used for initial integration
Remove two patches that were initially submitted to enable AIO
integration prior to the creation of the Debian kickstarts. Now that we
are utilizing the kickstart file and LAT kickstart hooks, remove the
unused code from the installer.

This change also renames patches in sequential order and cleanups up
subject lines.

Test Plan:
PASS: Install/Bootstrap/Provision AIO
PASS: Install/Bootstrap/Provision STD Controller/Worker

Change-Id: I5349a23c7fbd8b435fc9cbaffdecbafd388befa7
Story: 2009303
Task: 46189
Signed-off-by: Robert Church <robert.church@windriver.com>
2022-09-08 06:23:39 -05:00

34 lines
1.1 KiB
Diff

From: Charles Short <charles.short@windriver.com>
Date: Thu, 17 Feb 2022 15:21:03 -0500
Subject: debian: Copy /sysroot/var/log to LVM volume
Sync the contents of ostree/1/var/log and the
cgts-vg/log-lv volume so services will start properly
at boot.
Signed-off-by: Charles Short <charles.short@windriver.com>
---
init-ostree-install.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
index 0e5b8f3..1a53f3c 100644
--- a/init-ostree-install.sh
+++ b/init-ostree-install.sh
@@ -1486,6 +1486,15 @@ if [ -d ${PHYS_SYSROOT}/ostree/1/usr/homedirs/home ] ; then
tar --xattrs --xattrs-include='*' -xf - -C /var1/home 2> /dev/null
fi
+if [ -b /dev/cgts-vg/log-lv ]; then
+ if [ -d ${PHYS_SYSROOT}/ostree/1/var/log/apt ] ; then
+ mnt_point=$(mktemp -d)
+ mount -t ext4 /dev/cgts-vg/log-lv ${mnt_point} || fatal "Error mounting ${mnt_point}"
+ cp -rp ${PHYS_SYSROOT}/ostree/1/var/log/* ${mnt_point}
+ umount ${mnt_point}
+ fi
+fi
+
if [ -n "${KS}" ]; then
rootfs=`ls ${PHYS_SYSROOT}/ostree/? -d`
if [ "$INSTAB" = 1 ] ; then