Skip to content

Commit 6eebde0

Browse files
committed
lib/zfsbootmenu-core.sh: add initramfs generator to zreport
1 parent 99034d3 commit 6eebde0

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

‎zfsbootmenu/lib/zfsbootmenu-core.sh‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,24 +1993,33 @@ zreport() {
19931993
colorize white "System Report\n\n"
19941994

19951995
(
1996-
VERSION="unknown"
1997-
PRETTY_NAME="ZFSBootMenu"
1996+
ZBM_VERSION="unknown"
1997+
ZBM_PRETTY_NAME="ZFSBootMenu"
1998+
INITRD_VERSION="unknown initramfs"
19981999
UNAME="$( uname -srm )"
19992000

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

20032004
if [[ "${VERSION}" =~ dev$ ]]; then
2004-
VERSION="$( colorize red "${VERSION}" )"
2005+
ZBM_VERSION="$( colorize red "${VERSION}" )"
20052006
else
2006-
VERSION="$( colorize green "${VERSION}" )"
2007+
ZBM_VERSION="$( colorize green "${VERSION}" )"
20072008
fi
20082009

20092010
if [[ "${PRETTY_NAME}" == "ZFSBootMenu" ]]; then
2010-
PRETTY_NAME="$( colorize orange ZFS )$( colorize lightgray BootMenu )"
2011+
ZBM_PRETTY_NAME="$( colorize orange ZFS )$( colorize lightgray BootMenu )"
20112012
fi
20122013

2013-
echo -e "${PRETTY_NAME} ${VERSION} (${UNAME})"
2014+
if [ -f "/VERSION" ] ; then
2015+
read -r INITRD_VERSION < /VERSION
2016+
INITRD_VERSION="mkinitcpio ${INITRD_VERSION}"
2017+
elif [ -f /etc/initrd-release ] ; then
2018+
source /etc/initrd-release
2019+
[ -n "${DRACUT_VERSION}" ] && INITRD_VERSION="Dracut ${DRACUT_VERSION}"
2020+
fi
2021+
2022+
echo -e "${ZBM_PRETTY_NAME} ${ZBM_VERSION} with ${INITRD_VERSION} and ${UNAME}"
20142023
)
20152024

20162025
colorize orange "\n>> ZFSBootMenu commandline\n"

0 commit comments

Comments
 (0)