From 199a63bd4db2020c8d6aaad6723cf881c023c0ff Mon Sep 17 00:00:00 2001 From: Igor Murzov Date: Wed, 14 Mar 2012 01:00:22 +0400 Subject: insmod, modprobe: Don't hardcode path to modinfo (Alioth: #313569) --- completions/insmod | 4 ++-- completions/modprobe | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/completions/insmod b/completions/insmod index de619c01..545f8bc5 100644 --- a/completions/insmod +++ b/completions/insmod @@ -9,8 +9,8 @@ _insmod() if [[ $cword -eq 1 ]]; then _filedir '@(?(k)o?(.gz))' else # do module parameter completion - COMPREPLY=( $( compgen -W "$( /sbin/modinfo -p ${words[1]} \ - 2>/dev/null | cut -d: -f1 )" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "$( PATH="$PATH:/sbin" modinfo \ + -p ${words[1]} 2>/dev/null | cut -d: -f1 )" -- "$cur" ) ) fi } && complete -F _insmod insmod insmod.static diff --git a/completions/modprobe b/completions/modprobe index 6db1b351..cf35f4b9 100644 --- a/completions/modprobe +++ b/completions/modprobe @@ -73,8 +73,8 @@ _modprobe() _filedir '@(?(k)o?(.gz))' elif [[ -n "$module" ]]; then # do module parameter completion - COMPREPLY=( $( compgen -W "$( /sbin/modinfo -p "$module" \ - 2>/dev/null | cut -d: -f1 )" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "$( PATH="$PATH:/sbin" modinfo \ + -p "$module" 2>/dev/null | cut -d: -f1 )" -- "$cur" ) ) else _modules $version fi -- cgit v1.2.1