From 2d0cafcfd015dd661b07e9a897af2bf1c671adc1 Mon Sep 17 00:00:00 2001 From: John McGee Date: Sun, 4 Aug 2024 19:22:55 -0400 Subject: [PATCH 1/2] improve: sanoid should install on minimal if zfs --- ucore/install-ucore-minimal.sh | 5 +++++ ucore/install-ucore.sh | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ucore/install-ucore-minimal.sh b/ucore/install-ucore-minimal.sh index c5384f9..ab25829 100755 --- a/ucore/install-ucore-minimal.sh +++ b/ucore/install-ucore-minimal.sh @@ -59,6 +59,11 @@ if [[ "-zfs" == "${ZFS_TAG}" ]]; then depmod -A ${KERNEL_VERSION} fi +## CONDITIONAL: install sanoid if ZFS +if [[ "-zfs" == "${ZFS_TAG}" ]]; then + rpm-ostree install sanoid +fi + ## CONDITIONAL: install NVIDIA if [[ "-nvidia" == "${NVIDIA_TAG}" ]]; then # repo for nvidia rpms diff --git a/ucore/install-ucore.sh b/ucore/install-ucore.sh index 4bcd4b7..54c0be1 100755 --- a/ucore/install-ucore.sh +++ b/ucore/install-ucore.sh @@ -4,11 +4,6 @@ set -ouex pipefail RELEASE="$(rpm -E %fedora)" -## CONDITIONAL: install sanoid if ZFS -if [[ "-zfs" == "${ZFS_TAG}" ]]; then - rpm-ostree install sanoid -fi - # install packages.json stuffs export IMAGE_NAME=ucore /ctx/packages.sh From ad3b3f5d9059a9c6b03f81a789867fdf4df44523 Mon Sep 17 00:00:00 2001 From: John McGee Date: Sun, 4 Aug 2024 21:15:42 -0400 Subject: [PATCH 2/2] improve: combine into one conditional --- ucore/install-ucore-minimal.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ucore/install-ucore-minimal.sh b/ucore/install-ucore-minimal.sh index ab25829..fb71f16 100755 --- a/ucore/install-ucore-minimal.sh +++ b/ucore/install-ucore-minimal.sh @@ -52,15 +52,12 @@ else /tmp/rpms/kernel/kernel-modules-*.rpm fi -## CONDITIONAL: install ZFS (and sanoid deps) +## CONDITIONAL: install ZFS (and sanoid with deps) if [[ "-zfs" == "${ZFS_TAG}" ]]; then rpm-ostree install pv /tmp/rpms/akmods-zfs/kmods/zfs/*.rpm # for some reason depmod ran automatically with zfs 2.1 but not with 2.2 depmod -A ${KERNEL_VERSION} -fi - -## CONDITIONAL: install sanoid if ZFS -if [[ "-zfs" == "${ZFS_TAG}" ]]; then + rpm-ostree install sanoid fi