Skip to content

Commit

Permalink
zfsbootmenu-core: show enabled/disabled hooks in zreport
Browse files Browse the repository at this point in the history
  • Loading branch information
zdykstra committed Dec 7, 2023
1 parent 42d4529 commit cb8dfaa
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions zfsbootmenu/lib/zfsbootmenu-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,8 @@ emergency_shell() {
# returns: nothing

zreport() {
local hook

colorize white "System Report\n\n"

(
Expand All @@ -1948,9 +1950,21 @@ zreport() {
)

colorize orange "\n>> ZFSBootMenu commandline\n"
get_zbm_kcl | kcl_assemble
get_zbm_kcl | kcl_assemble ; echo

colorize orange "\n>> Enabled hooks\n"
for hook in /libexec/hooks/*.d/*; do
[ -x "${hook}" ] && echo "* $( colorize green "${hook}")"
done

colorize orange "\n>> Disabled hooks\n"
for hook in /libexec/hooks/*.d/*; do
[ -f "${hook}" ] || continue
[ -x "${hook}" ] && continue
echo "* $( colorize red "${hook}")"
done

colorize orange "\n\n>> ZFS/SPL module information\n"
colorize orange "\n>> ZFS/SPL module information\n"
echo "$( modinfo -F filename spl ): $( modinfo -F version spl )"
echo "$( modinfo -F filename zfs ): $( modinfo -F version zfs )"

Expand Down

0 comments on commit cb8dfaa

Please sign in to comment.