Package: wpasupplicant Version: 0.6.6-1 Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu ubuntu-patch jaunty
Hello, In https://launchpad.net/bugs/307312 it was reported that current wpasupplicant in experimental breaks suspend with current versions of pm-utils (1.2.2.1). In particular, /etc/pm/sleep.d/action_wpa makes the wrong assumption that pm-utils hooks are called with exactly one argument, which is wrong. From HOWTO.hooks: The actual sleep method being used will be passed as the second parameter -- if your hook needs to handle suspend-hybrid (or any other platform-specific sleep method), it should examine the second parameter. Attached debdiff fixes it again. Thanks for considering, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
diff -u wpasupplicant-0.6.6/debian/changelog wpasupplicant-0.6.6/debian/changelog --- wpasupplicant-0.6.6/debian/changelog +++ wpasupplicant-0.6.6/debian/changelog @@ -1,3 +1,13 @@ +wpasupplicant (0.6.6-1ubuntu1) jaunty; urgency=low + + * debian/ifupdown/action_wpa.sh: pm-utils now supplies a second + argument to the hooks, thus telling ifplugd and pm-utils apart by + the number of arguments does not work any more. Fix up the script + to just evaluate the arguments themselves, to work with current + and older pm-utils. This unbreaks suspend. (LP: #307312) + + -- Martin Pitt <martin.p...@ubuntu.com> Thu, 11 Dec 2008 16:57:31 -0800 + wpasupplicant (0.6.6-1) experimental; urgency=low * New upstream release. diff -u wpasupplicant-0.6.6/debian/ifupdown/action_wpa.sh wpasupplicant-0.6.6/debian/ifupdown/action_wpa.sh --- wpasupplicant-0.6.6/debian/ifupdown/action_wpa.sh +++ wpasupplicant-0.6.6/debian/ifupdown/action_wpa.sh @@ -17,7 +17,21 @@ COMMAND= IFPLUGD_IFACE= -if [ "$#" -eq 2 ]; then +# pm-action(8) - <action> <suspend method> +# +# On suspend|hibernate, disconnect any wpa-roam managed interfaces, +# reconnect it on resume. + +case "${1}" in + suspend|hibernate) + COMMAND=disconnect + ;; + resume|thaw) + COMMAND=reconnect + ;; +esac + +if [ -z "$COMMAND" ]; then # ifplugd(8) - <iface> <action> # # If an ifplugd managed interface is brought up, disconnect any @@ -34,30 +48,14 @@ COMMAND=reconnect ;; *) - echo "${SELF}: uknown ifplugd arguments: $...@}" >&2 + echo "${SELF}: unknown $0 arguments: $...@}" >&2 exit 1 ;; - esac -elif [ "$#" -eq 1 ]; then - # pm-action(8) - <action> - # - # On suspend|hibernate, disconnect any wpa-roam managed interfaces, - # reconnect it on resume. + esac +fi - case "${1}" in - suspend|hibernate) - COMMAND=disconnect - ;; - resume|thaw) - COMMAND=reconnect - ;; - *) - echo "${SELF}: uknown pm-action arguments: $...@}" >&2 - exit 1 - ;; - esac -else - echo "${SELF}: unknow arguments: $...@}" >&2 +if [ -z "$COMMAND" ]; then + echo "${SELF}: unknown arguments: $...@}" >&2 exit 1 fi
signature.asc
Description: Digital signature