Public bug reported:

Binary package hint: ifplugd

The "/etc/ifplugd/action.d/ifupdown" provided with ifplugd executes an
arbitrary:

/sbin/ifdown $1

For an interface going down. The problem is that ifdown is not meant to
be called directly for wireless interfaces when wpasupplicant is
installed. The correct behavior ought to be:

if down
  if wpasupplicant is installed and the current interface is a wireless one then
    execute wpa_action $1 down
  else
    execute ifdown $1

Sample code:

#!/bin/sh
set -e

case "$2" in
up)
        /sbin/ifup $1
        ;;
down)
  if [ -x /sbin/wpa_action ]; then
    if /bin/grep $1 /proc/net/wireless > /dev/null ; then
      /sbin/wpa_action $1 down
    else
      /sbin/ifdown $1
    fi
    ;;
  else
    /sbin/ifdown $1
  fi
esac

I'm not sure if there is a better way to check if an interface is
wireless than grepping /proc/net/wireless, but this provides the gist of
what I am suggesting.

xubuntu: 7.10
wpasupplicant: 0.6.0+0.5.8-0ubuntu1
ifplugd: 0.28-2.3ubuntu1
ifupdown: 0.6.8ubuntu8

** Affects: ifplugd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
ifplugd uses ifdown instead of wpa_action for wireless interfaces
https://bugs.launchpad.net/bugs/204314
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to