Bug 110242

Summary: busybox-1 doesn't have lsmod support
Product: [Retired] Red Hat Raw Hide Reporter: Karsten Hopp <karsten>
Component: busyboxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-14 09:49:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix lsmod support, disable colored ls
none
fix wrong define, it has been renamed none

Description Karsten Hopp 2003-11-17 15:01:20 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4.1)
Gecko/20031030

Description of problem:
you could symlink older busybox versions to lsmod and it used to work
such as the real lsmod. busybox-1 just prints out a list of supported
commands.

Version-Release number of selected component (if applicable):
busybox-1.00-2

How reproducible:
Always

Steps to Reproduce:
1. ln -s busybox lsmod
2. ./lsmod
3. no list of loaded modules
    

Actual Results:  busybox-1 just prints out a list of supported commands.

Expected Results:  should print out list of loaded modules, even
something similar to  'cat /proc/modules' would do.

Additional info:

unnecessary regression, would be a 'nice to have'

Comment 1 Kaj J. Niemi 2003-11-17 16:48:50 UTC
The busybox-static binary is able to handle lsmod but busybox built
for anaconda isn't.

[1 d107 /usr/src/redhat/BUILD/busybox-1.00]% ln busybox-static lsmod
[d107 /usr/src/redhat/BUILD/busybox-1.00]% ./lsmod
Module                  Size  Used by    Not tainted
[ ... ]

[d107 /usr/src/redhat/BUILD/busybox-1.00]% ln -s busybox lsmod
[d107 /usr/src/redhat/BUILD/busybox-1.00]% ./lsmod
BusyBox v1.00-pre2 (2003.11.17-16:28+0000) multi-call binary
 
Usage: busybox [function] [arguments]...
   or: [function] [arguments]...


QuickHack(tm) is to add

perl -pi -e 's/^# CONFIG_LSMOD.*/CONFIG_LSMOD=y/g;'
sysdeps/linux/defconfig

above "make DOLFS=y defconfig" in the %%build section of busybox.spec.

[@d107 /usr/src/redhat/BUILD/busybox-1.00]% !ln
ln busybox lsmod
[d107 /usr/src/redhat/BUILD/busybox-1.00]% ./lsmod
Module                  Size  Used by    Not tainted
[ ... ]



Comment 2 Karsten Hopp 2003-11-19 13:22:49 UTC
It looks like the defconfig files are from older busybox versions, 
many options are missing. Try to copy them to .config in the main 
directory and run 'make oldconfig' and you'll see. 
I'll attach an updated -anaconda patch and a new -s390 patch to fix 
a wrong define. 

Comment 3 Karsten Hopp 2003-11-19 13:25:22 UTC
Created attachment 96055 [details]
fix lsmod support, disable colored ls

patch to fix lsmod support and to disable colored ls (better fix would be to
check the terminal capabilities)

Comment 4 Karsten Hopp 2003-11-19 13:26:17 UTC
Created attachment 96056 [details]
fix wrong define, it has been renamed

Comment 5 Daniel Walsh 2004-03-25 16:03:19 UTC
Check out busybox-pre8 from rawhide and see if it fixes the problem.

Comment 6 Karsten Hopp 2004-06-14 09:49:07 UTC
current busybox looks ok to me