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

Bug#572622: bashism in POSIX shell script /usr/share/udhcpc/default.script



Package: udhcpc
Version: 1:1.15.3-1
Severity: normal
Tags: patch

Hi,

the script /usr/share/udhcpc/default.script contains code that is not
supported by POSIX, which causes the script fails to run with dash as
/bin/sh. Due to this the DNS server is not set.

--- /tmp/default.script 2010-02-28 14:31:23.635013139 +0100
+++ /usr/share/udhcpc/default.script    2010-02-28 14:19:18.000000000 +0100
@@ -19,7 +19,8 @@
 
            metric=0
            for i in $router; do
-               /sbin/route add default gw $i dev $interface metric $((metric++))
+               /sbin/route add default gw $i dev $interface metric $metric
+                metric=$(($metric + 1))
            done
        fi
 

Bye, Jörg

-- System Information:
Debian Release: unstable/experimental
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.33-rc7
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages udhcpc depends on:
ii  busybox                       1:1.15.3-1 Tiny utilities for small and embed

udhcpc recommends no packages.

udhcpc suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/udhcpc/default.script (from udhcpc package)

Attachment: signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP


Reply to: