From acf737fc4f93e53c482683f45ebff036da30b621 Mon Sep 17 00:00:00 2001 From: nazunalika Date: Wed, 10 Nov 2021 16:30:20 -0700 Subject: [PATCH] add treeinfo modder for kickstart directory --- sync/common_8 | 38 +++++++++++++++++++++++++++ sync/minor-release-sync-to-staging.sh | 1 + 2 files changed, 39 insertions(+) diff --git a/sync/common_8 b/sync/common_8 index e904bbc..0577166 100644 --- a/sync/common_8 +++ b/sync/common_8 @@ -114,5 +114,43 @@ EOF /bin/cp "${TREEINFO_VAR}" "${PRISTINE_TREE}" } +function treeinfoModderKickstart() { + BaseOSArch="${1}" + TREEINFO_VAR="${STAGING_ROOT}/${RELEASE_DIR}/BaseOS/${BaseOSArch}/os/.treeinfo" + PRISTINE_TREE="${STAGING_ROOT}/${RELEASE_DIR}/BaseOS/${BaseOSArch}/os/.treeinfo-pristine" + test -f "${TREEINFO_VAR}" + treeinfo_retval=$? + test -x /usr/bin/python3 + python_retval=$? + # There is an awk way to do this, but it was easier to implement python and + # cat heredoc together. It felt cleaner. This was a trick I had used in a + # previous life when I had to admin Solaris systems, and I needed a way to + # add a solaris 10 system into FreeIPA (it was not fun, let me tell you). But + # the take away is I learned something kind of on the fly and well, it worked. + # Emails should have stamps. + if [ "$treeinfo_retval" -eq 0 ] && [ "$python_retval" -eq 0 ]; then + cat <