[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#192232: Modifications to get modconf working w/ 2.5/2.6 kernel



Package: modconf
Version: 0.2.44
Severity: normal
Followup-For: Bug #192232

Here are some modifications I made locally to get modconf to work with
a 2.6 kernel:

Begin diff:
----------------------------------------------------------------------
diff -r orig/modconf/mkdescr.pl modconf/mkdescr.pl
26c26
<     elsif (m,   */sbin/modprobe (.*)\.o( (.*)|)$,) {
---
>     elsif (m,   */sbin/modprobe (.*)\.k?o( (.*)|)$,) {
diff -r orig/modconf/modconf modconf/modconf
213,220c213,217
<     if [ -d $Dir_Prefix/$i -a \
<       -f $(first $Dir_Prefix/$i/*.o) ]; then
<       if [ -n "$Exclude_Section" ] && 
<                             in_list $i $Exclude_Section ; then
<         true
<                   else
<         dir_descrs="$dir_descrs $i"
<       fi
---
>     if [ -n "$Exclude_Section" ] && 
>                           in_list $i $Exclude_Section ; then
>       true
>                 else
>       dir_descrs="$dir_descrs $i"
diff -r orig/modconf/modules/util modconf/modules/util
34,35c34,35
<   # strip off .o suffix
<   module=${module%.o}
---
>   # strip off .o or .ko suffix
>   module=`echo $module | perl -pe 's/\.k?o$//'`
60c60
<     chandev_module_list="$(for file in `find /lib/modules/$kver -name "*.o"`; do grep -q "chandev_register" $file;  if [ $? -eq 0 ]; then basemodulename $file; fi; done | sort -u)"
---
>     chandev_module_list="$(for file in `find /lib/modules/$kver \( -name "*.o" -o -name "*.ko" \)`; do grep -q "chandev_register" $file;  if [ $? -eq 0 ]; then basemodulename $file; fi; done | sort -u)"
133c133,134
<     list="$Dir_Prefix/$directory/*.o"
---
>     list=`find $Dir_Prefix/$directory -mindepth 1 -maxdepth 1 \
> 	-name \*.o -o -name \*.ko`
594,597c595,597
<   for dir in $(cd $mdir; find -type d); do
<     if [ "$dir" != "." ]; then
<       echo ${dir#./}
<     fi
---
>   for dir in $(cd $mdir; find -type f -name \*.o -o -name \*.ko \
>       -printf "%h\n" | uniq); do
>     echo ${dir#./}
----------------------------------------------------------------------
end diff

This seems to get the program to at least list and load modules,
though none of them have descriptions.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux frankenstein 2.6.0-test7-1-386 #1 Sun Oct 12 10:29:56 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages modconf depends on:
ii  modutils                      2.4.25-3   Linux module utilities
ii  whiptail [whiptail-provider]  0.51.4-18  Displays user-friendly dialog boxe




Reply to: