Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
defaults.sh: Don't override INSMOD variable if it is already set
@SpareSimian noticed that sqm-scripts would always use 'insmod' to load modules on CentOS even though modprobe was also available. @gordonmessmer noticed that this was due to the way the shell chains '&&' and '||' operators, which would evaluate the second assignment if the first zero-length check fails. And since defaults.sh is included from both 'start-sqm' and the .qos scripts, this double-evaluation always happens on non-OpenWrt installations. Fix this by properly grouping the assignment operators so they are evaluated together if the variable is unset. Fixes #133. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
- Loading branch information