aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2019-08-15 12:28:32 -0700
committerAndy Lutomirski <luto@kernel.org>2019-08-15 12:28:32 -0700
commit7625c4d8c95f72f2661774b7942369f76736b259 (patch)
tree2caf06c61de19adb09ba5873039c0cb79a0b3806
parent235b4141e4eef5d671204aba14be21a0d1a55e87 (diff)
downloadvirtme-7625c4d8c95f72f2661774b7942369f76736b259.tar.gz
modfinder.py: Tidy up the search for modprobe
Signed-off-by: Andy Lutomirski <luto@kernel.org>
-rw-r--r--virtme/modfinder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/virtme/modfinder.py b/virtme/modfinder.py
index b44eb37..f0a0601 100644
--- a/virtme/modfinder.py
+++ b/virtme/modfinder.py
@@ -20,8 +20,8 @@ import itertools
_INSMOD_RE = re.compile('insmod (.*[^ ]) *$')
def resolve_dep(modalias, root=None, kver=None, moddir=None):
- # In openSUSE and SLE, modprobe is not in the PATH of ordinary users
- modprobe = shutil.which('modprobe') or shutil.which('/usr/sbin/modprobe')
+ # /usr/sbin might not be in the path, and modprobe is usually in /usr/sbin
+ modprobe = shutil.which('modprobe') or '/usr/sbin/modprobe'
args = [modprobe, '--show-depends']
args += ['-C', '/var/empty']
if root is not None: