Package: hotplug
Version: 0.0.20040329-16
Severity: important

The hotplug init script (/etc/init.d/hotplug) contains a "bashism" in
the run_rcs() function.

see also: https://bugzilla.ubuntu.com/show_bug.cgi?id=5473

Attached you get the patch for it.

Cheers,
amu 


-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.8-10-amd64-k8
Locale: LANG=C, LC_CTYPE=C 

Versions of packages hotplug depends on:
ii  debconf                      1.4.42      Debian configuration management sy
ii  grep                         2.5.1.ds1-4 GNU grep, egrep and fgrep
ii  module-init-tools            3.1-rel-2   tools for managing Linux kernel mo
ii  modutils                     2.4.26-1.2  Linux module utilities
ii  procps                       1:3.2.4-1   The /proc file system utilities

-- debconf information excluded
diff -Nru hotplug.init.orig hotplug.init
--- hotplug.init.orig   2005-01-17 15:14:13.560379576 +0100
+++ hotplug.init        2005-01-17 15:15:52.982265152 +0100
@@ -25,17 +25,17 @@
 
 run_rcs() {
     PRINTK=`cat /proc/sys/kernel/printk`
-    [ "$VERBOSE" == no ] && echo "0 0 0 0" > /proc/sys/kernel/printk
+    [ "x$VERBOSE" == "xno" ] && echo "0 0 0 0" > /proc/sys/kernel/printk
     for RC in /etc/hotplug/*.rc; do
        basename=${RC#/etc/hotplug/}
        name=${basename%.rc}
-       [ "$VERBOSE" != no ] && log_begin_msg "Running $basename..."
+       [ "x$VERBOSE" != "xno" ] && log_begin_msg "Running $basename..."
        if [ "$(eval echo \$HOTPLUG_RC_$name)" = no ]; then
-           [ "$VERBOSE" != no ] && log_end_msg 1 || true
+           [ "x$VERBOSE" != "xno" ] && log_end_msg 1 || true
            continue
        fi
        set +e
-       if [ "$VERBOSE" != no ]; then
+       if [ "x$VERBOSE" != "xno" ]; then
                $RC $1
                RC_STATUS=$?
        else
@@ -46,7 +46,7 @@
        if [ "$1" = status ]; then
            continue
        fi
-       [ "$VERBOSE" != no ] && log_end_msg $RC_STATUS || true
+       [ "x$VERBOSE" != "xno" ] && log_end_msg $RC_STATUS || true
     done
     echo "$PRINTK" > /proc/sys/kernel/printk
     return 0

Reply via email to