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

Bug#88413: [PATCH]: modconf broken with ash



Package: modconf
Version: 0.2.31
Severity: grave

ash is used in boot-floppies.  This bug is marked grave because is breaks
boot-floppies.  modconf works fine with bash.

$ /bin/ash < modconf
Syntax error: Bad substitution
$

Now I'll use ash directly and it will give a better error message:
$ diff -u modconf.orig modconf
--- modconf.orig        Sat Mar  3 18:47:37 2001
+++ modconf     Sat Mar  3 18:47:44 2001
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/ash
 # Please make sure this file can be executed by both "bash" and "ash".
 # Also, the external functions used has to be restricted to the ones available
 #   via busybox if it is to be used on the boot floppies
$ ./modconf
./modconf: 115: Syntax error: Bad substitution
$ 


Here is a patch that fixes it.  My guess is that even though the BASH_VERSION
is not defined ash still needs to parse the offending line 115. It fails.

--- modconf.orig	Sat Mar  3 18:47:37 2001
+++ modconf	Sat Mar  3 18:50:26 2001
@@ -109,11 +109,7 @@
 
     local help=""
     local summary=""
-    if [ -z "$BASH_VERSION" ]; then
-      tdir=`echo $directory | tr / _`
-    else
-      tdir=${directory//\//_}
-    fi
+    tdir=`echo $directory | tr / _`
 
     eval "summary=$`echo dir_descr_$tdir`"
 




-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux ruff 2.2.17 #2 Sat Dec 30 11:46:38 PST 2000 i686

Versions of packages modconf depends on:
ii  modutils                      2.4.2-1    Linux module utilities.           
ii  whiptail                      0.50.17-1  Displays user-friendly dialog boxe



Reply to: