diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-07-11 04:20:28 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-09-27 12:18:04 +0200 |
commit | 5a0f7ebc8d2cede7532539268e0ffc0bd6816572 (patch) | |
tree | 1709a7c58504db390f0161977af581e32da394fc /install/base | |
parent | ff557b25937b3511dd04e009a4735b73d1279d4c (diff) | |
download | mkinitcpio-5a0f7ebc8d2cede7532539268e0ffc0bd6816572.tar.gz mkinitcpio-5a0f7ebc8d2cede7532539268e0ffc0bd6816572.tar.xz |
functions: allow ignoring errors on module addition
We conditionally, but naively, add modules in some of our install hooks,
but the kernel may not have these. Note that these modules can fail
silently by detecting a '?' suffix on the module name. In conjunction with
this, the add_module function now takes a flag, -t or --try, which will
ignore module not found errors from modinfo. The config file will also
support this syntax.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'install/base')
-rw-r--r-- | install/base | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/install/base b/install/base index b4f23d5..e85551c 100644 --- a/install/base +++ b/install/base @@ -24,7 +24,7 @@ build() { read -r -a hooks <<< "$HOOKS" { - (( ${#modules[*]} )) && printf 'MODULES="%s"\n' "${modules[*]}" + (( ${#modules[*]} )) && printf 'MODULES="%s"\n' "${modules[*]%\?}" (( ${#hooks[*]} )) && printf 'HOOKS="%s"\n' "${hooks[*]}" } >"$BUILDROOT/config" ) |