Skip to content

Commit

Permalink
Merge pull request #235 from desultory/dev
Browse files Browse the repository at this point in the history
improve installkernel verbose handling, don't pass an empty arg
  • Loading branch information
desultory authored Mar 1, 2025
2 parents 204be45 + 5a51702 commit 29b21bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hooks/installkernel/52-ugrd.install
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ main() {

[[ ${EUID} -eq 0 ]] || die "Please run this script as root"

ugrd --no-rotate --kver "${ver}" "${initrd}"
ugrd "$([ "${INSTALLKERNEL_VERBOSE}" = 1 ] && echo --log-level=10 || echo --log-level=20)" --no-rotate --kver "${ver}" "${initrd}"
case $? in
0) einfo "Generated initramfs for kernel: ${ver}";;
77) ewarn "Missing ZFS kernel module for kernel: ${ver}" && exit 77;;
Expand Down
2 changes: 1 addition & 1 deletion hooks/kernel-install/52-ugrd.install
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ KERNEL_VERSION="${2:?}"
# only run when the COMMAND is add, and fewer than 5 arguments are passed
[ "${COMMAND}" = "add" ] && [ "${#}" -lt 5 ] || exit 0

ugrd "$([ "${KERNEL_INSTALL_VERBOSE}" = 1 ] && echo --debug)" --no-rotate --kver "${KERNEL_VERSION}" "${KERNEL_INSTALL_STAGING_AREA}/initrd"
ugrd "$([ "${KERNEL_INSTALL_VERBOSE}" = 1 ] && echo --log-level=10 || echo --log-level=20)" --no-rotate --kver "${KERNEL_VERSION}" "${KERNEL_INSTALL_STAGING_AREA}/initrd"
case $? in
0) ;;
77) echo "Missing ZFS kernel module for kernel: ${KERNEL_VERSION}"; exit 77 ;;
Expand Down

0 comments on commit 29b21bb

Please sign in to comment.