Skip to content

Commit

Permalink
lib/zfsbootmenu-core.sh: add initramfs generator to zreport
Browse files Browse the repository at this point in the history
  • Loading branch information
zdykstra committed Oct 12, 2024
1 parent 99034d3 commit c56ab04
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions zfsbootmenu/lib/zfsbootmenu-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1993,24 +1993,33 @@ zreport() {
colorize white "System Report\n\n"

(
VERSION="unknown"
PRETTY_NAME="ZFSBootMenu"
ZBM_VERSION="unknown"
ZBM_PRETTY_NAME="ZFSBootMenu"
INITRD_VERSION="unknown initramfs"
UNAME="$( uname -srm )"

# shellcheck disable=SC1091
[ -f /etc/zbm-release ] && source /etc/zbm-release

if [[ "${VERSION}" =~ dev$ ]]; then
VERSION="$( colorize red "${VERSION}" )"
ZBM_VERSION="$( colorize red "${VERSION}" )"
else
VERSION="$( colorize green "${VERSION}" )"
ZBM_VERSION="$( colorize green "${VERSION}" )"
fi

if [[ "${PRETTY_NAME}" == "ZFSBootMenu" ]]; then
PRETTY_NAME="$( colorize orange ZFS )$( colorize lightgray BootMenu )"
ZBM_PRETTY_NAME="$( colorize orange ZFS )$( colorize lightgray BootMenu )"
fi

echo -e "${PRETTY_NAME} ${VERSION} (${UNAME})"
if [ -f "/VERSION" ] ; then
read -r INITRD_VERSION < /VERSION
INITRD_VERSION="mkinitcpio ${INITRD_VERSION}"
elif [ -f /etc/initrd-release ] ; then
source /etc/initrd-release
[ -n "${DRACUT_VERSION}" ] && INITRD_VERSION="Dracut ${DRACUT_VERSION}"
fi

echo -e "${ZBM_PRETTY_NAME} ${ZBM_VERSION} with ${INITRD_VERSION} and ${UNAME}"
)

colorize orange "\n>> ZFSBootMenu commandline\n"
Expand Down

0 comments on commit c56ab04

Please sign in to comment.