diff options
author | Piotr Gorski | 2018-11-24 00:07:24 +0100 |
---|---|---|
committer | Piotr Gorski | 2018-11-24 00:07:24 +0100 |
commit | dade4d4dc5def1b2d4a4729886d20f7c3a4b5d8b (patch) | |
tree | 2cb275f469855c2c5b4bc6f67bdb5721d5af008b | |
parent | 8deb2e129eee935cf9192884c6ea8c76184130df (diff) | |
download | aur-dade4d4dc5def1b2d4a4729886d20f7c3a4b5d8b.tar.gz |
Improve localmodcfg
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
-rw-r--r-- | PKGBUILD | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -28,7 +28,9 @@ _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 BEFORE you begin making the pkg! +# 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. # # 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 @@ -227,15 +229,13 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - msg "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 - fi - msg "Running Steven Rostedt's make localmodconfig now" + 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" make localmodconfig + fi fi # save configuration for later reuse |