diff --git a/ucore/install-ucore-minimal.sh b/ucore/install-ucore-minimal.sh index adb686a..0e01470 100755 --- a/ucore/install-ucore-minimal.sh +++ b/ucore/install-ucore-minimal.sh @@ -57,9 +57,6 @@ if [[ "-zfs" == "${ZFS_TAG}" ]]; then rpm-ostree install pv /tmp/rpms/akmods-zfs/kmods/zfs/*.rpm /tmp/rpms/akmods-zfs/kmods/zfs/other/zfs-dracut-*.rpm # for some reason depmod ran automatically with zfs 2.1 but not with 2.2 depmod -a -v ${KERNEL_VERSION} - - curl -L https://github.com/45Drives/cockpit-zfs-manager/archive/refs/tags/v1.3.1.tar.gz | tar xz -C /tmp - mv /tmp/cockpit-zfs-manager-1.3.1/zfs /usr/share/cockpit fi ## CONDITIONAL: install NVIDIA diff --git a/ucore/install-ucore.sh b/ucore/install-ucore.sh index c210bb6..bb9ff96 100755 --- a/ucore/install-ucore.sh +++ b/ucore/install-ucore.sh @@ -13,6 +13,28 @@ fi export IMAGE_NAME=ucore /ctx/packages.sh +## CONDITIONAL: ZFS support +if [[ "-zfs" == "${ZFS_TAG}" ]]; then + # cockpit plugin for ZFS management + curl --fail --retry 5 --retry-delay 5 --retry-all-errors -sSL -o /tmp/cockpit-zfs-manager-api.json \ + "https://api.github.com/repos/45Drives/cockpit-zfs-manager/releases/latest" + CZM_TGZ_URL=$(cat /tmp/cockpit-zfs-manager-api.json | jq -r .tarball_url) + curl -sSL -o /tmp/cockpit-zfs-manager.tar.gz "${CZM_TGZ_URL}" + + mkdir -p /tmp/cockpit-zfs-manager + tar -zxvf /tmp/cockpit-zfs-manager.tar.gz -C /tmp/cockpit-zfs-manager --strip-components=1 + mv /tmp/cockpit-zfs-manager/polkit-1/actions/* /usr/share/polkit-1/actions/ + mv /tmp/cockpit-zfs-manager/polkit-1/rules.d/* /usr/share/polkit-1/rules.d/ + mv /tmp/cockpit-zfs-manager/zfs /usr/share/cockpit + + curl -sSL -o /tmp/cockpit-zfs-manager-font-fix.sh \ + https://raw.githubusercontent.com/45Drives/scripts/refs/heads/main/cockpit_font_fix/fix-cockpit.sh + chmod +x /tmp/cockpit-zfs-manager-font-fix.sh + /tmp/cockpit-zfs-manager-font-fix.sh + + rm -rf /tmp/cockpit-zfs-manager* +fi + # install packages direct from github /ctx/github-release-install.sh trapexit/mergerfs "fc${RELEASE}.x86_64"