diff options
author | Piotr Gorski | 2018-12-02 18:50:29 +0100 |
---|---|---|
committer | Piotr Gorski | 2018-12-02 18:50:29 +0100 |
commit | 0e868ad028fad5131096ecdaf7da654e0854b580 (patch) | |
tree | 482cb61fb53fce217d53eba4ac16507806eb9dd2 | |
parent | 97577e7af525b73069e7e5a8fb28818097df14d5 (diff) | |
download | aur-0e868ad028fad5131096ecdaf7da654e0854b580.tar.gz |
Improve localmodcfg
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
-rw-r--r-- | PKGBUILD | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -29,9 +29,7 @@ _NUMAdisable=y # that you currently have probed in your system VASTLY reducing the number of # modules built and the build time to do it. # -# WARNING - ALL modules must be probed or loaded via a config file BEFORE you -# begin making the pkg unless you're running modprobed-db (AUR) and building -# this with makepkg as the user who is keeping the database. +# WARNING - ALL modules must be probed BEFORE you begin making the pkg! # # To keep track of which modules are needed for your specific system/hardware, # give module_db script a try: https://aur.archlinux.org/packages/modprobed-db @@ -153,11 +151,12 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -f $HOME/.config/modprobed.db ]; then - msg2 "Found a modprobed-db database for Steven Rostedt's make localmodconfig" - make LSMOD=$HOME/.config/modprobed.db localmodconfig - else - msg2 "Running Steven Rostedt's make localmodconfig now" + msg2 "If you have modprobed-db installed, running it in recall mode now" + if [ -e /usr/bin/modprobed-db ]; then + [[ -x /usr/bin/sudo ]] || { + echo "Cannot call modprobe with sudo. Install sudo and configure it to work with this user." + exit 1; } + sudo /usr/bin/modprobed-db recall make localmodconfig fi fi |