[CentOS] bash: return status of an assignment

Sat Feb 27 21:32:55 UTC 2021
Kenneth Porter <shiva at sewingwitch.com>

In the sqm-scripts package for managing network traffic shaping is this 
line for finding a program suitable for loading the kernel shaping modules:

[ -z "$INSMOD" ] && INSMOD=$(which modprobe) || INSMOD=$(which insmod)

It seems to set INSMOD to /usr/sbin/insmod, even though /usr/sbin/modprobe 
is available. (Both are symlinks to ../bin/kmod.)

According to this article, the return value of the first assignment should 
be success and it shouldn't take the fallback statement:

<https://unix.stackexchange.com/questions/270828/how-is-the-return-status-of-a-variable-assignment-determined>

Also working the issue here:

<https://github.com/tohojo/sqm-scripts/issues/133>