]> git.pld-linux.org Git - packages/rc-scripts.git/blame - lsmod-fix.patch
fix: return _false_
[packages/rc-scripts.git] / lsmod-fix.patch
CommitLineData
24583301 1--- lib/functions 2020-02-08 10:48:07.000000000 +0100
2+++ lib/functions.lsmod 2020-03-13 10:59:06.029459498 +0100
3@@ -1106,6 +1106,9 @@
4
5 # module is needed (ie. is requested, is available and isn't loaded already)
6 is_module() {
7+ # return false if /sbin/lsmod not exists (like in containers)
eafede3a 8+ [ -x /sbin/lsmod ] || return 1
24583301 9+
10 # module name without .o at end
11 if ! lsmod | grep -q "$1"; then
12 if ls -1R /lib/modules/$(uname -r)/ 2> /dev/null | grep -q "^${1}.\(\|k\)o\(\|.gz\)"; then
This page took 0.292259 seconds and 4 git commands to generate.