Skip to content

Commit

Permalink
feat: add cockpit-zfs-manager for zfs builds (#145)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Sherman <[email protected]>
  • Loading branch information
Eelviny and bsherman authored Jan 9, 2025
1 parent 7d3cfad commit 9bc61b6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ This image builds on `ucore-minimal` but adds drivers, storage tools and utiliti
- [snapraid](https://www.snapraid.it/)
- usbutils(and pciutils) - technically pciutils is pulled in by open-vm-tools in ucore-minimal
- Optional [ZFS versions](#tag-matrix) add:
- [cockpit-zfs-manager](https://github.com/45Drives/cockpit-zfs-manager) (an interactive ZFS on Linux admin package for Cockpit)
- [sanoid/syncoid dependencies](https://github.com/jimsalterjrs/sanoid) - [see below](#zfs) for details

#### `ucore-hci`
Expand Down
22 changes: 22 additions & 0 deletions ucore/install-ucore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$(jq -r .tarball_url /tmp/cockpit-zfs-manager-api.json)
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"

Expand Down

0 comments on commit 9bc61b6

Please sign in to comment.