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

ash bug, modconf on the boot-floppies



Hi,

I'm tracking down the modconf segfaults at the moment.
I installed the drivers via floppy because someone said it then would
work, but no.

I think its a bug in ash, heres a small sample that triggers it:

\h:\w\$ get() { echo; echo block; }
\h:\w\$ for i in $(get); do echo $i; done
Segmentation fault
block
\h:\w\$ 

Anything below is just how I found out, so if its ash fault you might skip it.

======================================================================

I chrooted into the ramdisk and started (just like the script does):
/target/usr/sbin/modconf --exclude-section pcmcia --target /target --run-shell cdromsymlink --libdir /tmp/drivers --helpdir /target/usr/share/modconf --tty /dev/tty

The first segfault occurs around line 193 (i added some debug output,
not indented lines, so I might be off target):

----------------------------------------------------------------------
if [ "$Source" = "floppy" ]; then
  if [ -f $ModuleContentDir/modcont ]; then
    . $ModuleContentDir/modcont
  else
    echo "$msg_Cannot_open $ModuleContentDir/modcont"
    exit 1
  fi
else
  dir_descrs=""
echo >/dev/tty main -- Dir_Prefix = $Dir_Prefix
get_modules_dirs $Dir_Prefix
  for i in $(get_modules_dirs $Dir_Prefix); do
echo >/dev/tty main -- i = $i   ####### SEGFAULT before this is executed
    if [ -d $Dir_Prefix/$i -a \
----------------------------------------------------------------------

I added some debug output to all functions, here it is:

----------------------------------------------------------------------
modconf -- press return
main -- press return
parse_cmdline -- press return
params -- press return
util -- press return
Whiptail -- press return
source_eval -- press return
check_dirs -- press return
check_dirs -- done
check_modules -- press return
check_modules -- done
check_modules_conf -- press return
check_modules_conf -- done
main -- Dir_Prefix = /target/lib/modules/2.4.7-ac4
get_modules_dirs -- press return

block
net
ipv4
scsi
fs
misc
get_modules_dirs -- done
get_modules_dirs -- press return
get_modules_dirs -- done
Segmentation fault
first -- press return
----------------------------------------------------------------------

MfG
        Goswin



Reply to: