[pkg-wpa-devel] Bug#506328: wpasupplicant: Missing -d in testing for a directory in init script

Braun Gábor braung at renyi.hu
Thu Nov 20 15:01:38 UTC 2008


Package: wpasupplicant
Version: 0.6.4-2
Severity: normal
Tags: patch

I guess a -d is missing in line 62 in /etc/init.d/wpa-ifupdown:

     elif [ /var/run/sendsigs.omit.d/ ]; then

I assume that the intent is to test for the existence of a directory.
However, the line above tests for the non-emptiness of the string 
"/var/run/sendsigs.omit.d/" (which is always true).

Therefore, I suggest the following patch.
Note that I do not know what is the intent here,
I have just spotted a suspicious expression.

--- /etc/init.d/wpa-ifupdown    2008-07-17 16:38:12.000000000 +0200
+++ /etc/init.d/wpa-ifupdown    2008-11-20 14:53:36.000000000 +0100
@@ -59,7 +59,7 @@
        if [ -d /lib/init/rw/sendsigs.omit.d/ ]; then
                # Debian
                return 0
-       elif [ /var/run/sendsigs.omit.d/ ]; then
+       elif [ -d /var/run/sendsigs.omit.d/ ]; then
                # Ubuntu, cf. https://bugs.launchpad.net/bugs/181541
                return 0
        fi

        Gábor Braun

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable'), (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-etchnhalf.1-686
Locale: LANG=hu_HU.UTF-8, LC_CTYPE=hu_HU.UTF-8 (charmap=UTF-8)

Versions of packages wpasupplicant depends on:
ii  adduser                       3.102      Add and remove users and groups
ii  libc6                         2.7-16     GNU C Library: Shared libraries
ii  libdbus-1-3                   1.2.1-4    simple interprocess messaging 
syst
ii  libpcsclite1                  1.4.102-1  Middleware to access a smart card 
ii  libreadline5                  5.2-2      GNU readline and history 
libraries
ii  libssl0.9.8                   0.9.8g-14  SSL shared libraries
ii  lsb-base                      3.2-20     Linux Standard Base 3.2 init 
scrip

wpasupplicant recommends no packages.

-- no debconf information





More information about the Pkg-wpa-devel mailing list