Skip to content

Commit

Permalink
defaults.sh: invoke modprobe quietly
Browse files Browse the repository at this point in the history
In OpenWrt, if the required qdisc and classifier modules are built-in, modprobe
complains, rather loudly, for not being able to find them. This unnecessarily
fills the log with pointless error messages, so let's quiet it down.

Signed-off-by: Rui Salvaterra <[email protected]>
  • Loading branch information
rsalvaterra committed Sep 2, 2021
1 parent e789773 commit 91de1fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@


# Try modprobe first, fall back to insmod
[ -z "$INSMOD" ] && { INSMOD=$(command -v modprobe) || INSMOD=$(command -v insmod); }
if [ -z "$INSMOD" ]; then
INSMOD=$(command -v modprobe)
if [ -n "$INSMOD" ]; then
INSMOD="${INSMOD} -q"
else
INSMOD=$(command -v insmod)
fi
fi

[ -z "$TARGET" ] && TARGET="5ms"
[ -z "$IPT_MASK" ] && IPT_MASK="0xff" # to disable: set mask to 0xffffffff
#sm: we need the functions above before trying to set the ingress IFB device
Expand Down

0 comments on commit 91de1fa

Please sign in to comment.