Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 271286

Summary: sys-apps/module-init-tools-3.8 bash-completion for rmmod no longer works
Product: Gentoo Linux Reporter: Steffen Hau <steffen>
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED FIXED    
Severity: normal CC: djphazer, m.debruijne
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 271302    
Bug Blocks:    

Description Steffen Hau 2009-05-26 10:19:11 UTC
Bash Completion for rmmod no longer works. It says:

rmmod -su: /sbin/lsmod: File or directory not found

The location of lsmod is hardcoded into /usr/share/bash-completion/base and since module-init-tools the lsmod binary has moved from /sbin to /bin.

Reproducible: Always

Steps to Reproduce:
1. emerge =sys-apps/module-init-tools
2. enable bash-completion base
3. rmmod <tab>

Actual Results:  
Bash completion fails.

Expected Results:  
rmmod shows the list of loaded modules
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-05-26 12:54:57 UTC
thx for the report, waiting to see more comments on bug 271302.
Comment 2 Nicholas J. Michalek 2009-05-31 06:02:36 UTC
Since bug 271302 is a WONTFIX, a simple one-character change fixes this for bash-completion-1.0-r3:

--- /usr/share/bash-completion/.pre.old 2009-05-20 04:15:42.000000000 -0400
+++ /usr/share/bash-completion/.pre     2009-05-31 02:00:02.000000000 -0400
@@ -430,7 +430,7 @@
 #
 _installed_modules()
 {
-       COMPREPLY=( $( compgen -W "$( /sbin/lsmod | \
+       COMPREPLY=( $( compgen -W "$( /bin/lsmod | \
                                  awk '{if (NR != 1) print $1}' )" -- $1 ) )
 }
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-06-03 22:23:13 UTC
fixed in -r4.