Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/zfsbootmenu-core.sh: add initramfs generator to zreport #682

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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