From cc6fc6140871405da7bf3e37aafd2eef6515ddf2 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 5 May 2024 16:51:22 +0200 Subject: modules: don't call modprobe without arguments In pf-modules and dt-modules, we must not call modprobe if there are no arguments to avoid a warning at boot. --- sbin/dt-modules | 4 +++- sbin/pf-modules | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sbin/dt-modules b/sbin/dt-modules index 29e7f0e..01d9a63 100755 --- a/sbin/dt-modules +++ b/sbin/dt-modules @@ -77,4 +77,6 @@ if [ -n "$DO_LIST_MOD" ]; then fi # and load all available modules -exec modprobe -a "${modules[@]}" +if [ "${#modules[@]}" -gt 0 ]; then + exec modprobe -a "${modules[@]}" +fi diff --git a/sbin/pf-modules b/sbin/pf-modules index a04856f..4c0c509 100755 --- a/sbin/pf-modules +++ b/sbin/pf-modules @@ -76,4 +76,6 @@ if [ -n "$DO_LIST_MOD" ]; then fi # and load all available modules -exec modprobe -a "${modules[@]}" +if [ "${#modules[@]}" -gt 0 ]; then + exec modprobe -a "${modules[@]}" +fi -- 2.17.5