Skip to content

Commit

Permalink
feat(squash): use require_kernel_modules for better module checking
Browse files Browse the repository at this point in the history
require_kernel_modules prints more friendly erorr message and make the
code cleaner.

Signed-off-by: Kairui Song <kasong@tencent.com>
  • Loading branch information
ryncsn authored and aafeijoo-suse committed Dec 21, 2022
1 parent d3a5e63 commit d4a9d6b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions modules.d/99squash/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

check() {
require_binaries mksquashfs unsquashfs || return 1

for i in CONFIG_SQUASHFS CONFIG_BLK_DEV_LOOP CONFIG_OVERLAY_FS; do
if ! check_kernel_config $i; then
dinfo "dracut-squash module requires kernel configuration $i (y or m)"
return 1
fi
done
require_kernel_modules squashfs loop overlay || return 1

return 255
}
Expand Down

0 comments on commit d4a9d6b

Please sign in to comment.