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

zfsbootmenu-core: show enabled/disabled hooks in zreport #550

Merged
merged 1 commit into from
Dec 7, 2023
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
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