Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#998 closed defect (fixed)

wrong path for wpa_passphrase on Debian

Reported by: sascha_silbe Owned by: tomeu
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: Git as of bugdate
Severity: Major Keywords: r+
Cc: Distribution/OS: Debian
Bug Status: New

Description

On Debian (derivates), wpa_passphrase is in /usr/bin, not /usr/sbin. As the path is currently hardcoded WPA support breaks on those distros.

Attachments (1)

sugar-wpa_passphrase-PATH.patch (1.0 KB) - added by sascha_silbe 15 years ago.
locate wpa_passphrase using PATH; append /sbin and /usr/sbin to PATH in "sugar"

Download all attachments as: .zip

Change History (9)

comment:1 follow-up: Changed 15 years ago by sascha_silbe

Another way to solve this would be to remove the hardcoded path on the wpa_passphrase call and add /usr/sbin to PATH during startup of Sugar.
Personally I'd prefer that solution since having /usr/sbin in PATH is useful on it's own anyway.

comment:2 in reply to: ↑ 1 Changed 15 years ago by tomeu

  • Keywords r- added; r? removed

Replying to sascha_silbe:

Another way to solve this would be to remove the hardcoded path on the wpa_passphrase call and add /usr/sbin to PATH during startup of Sugar.
Personally I'd prefer that solution since having /usr/sbin in PATH is useful on it's own anyway.

Yeah, I would prefer if we used python's implementation for finding a binary to execute rather than cooking our own. Though I'm unsure about setting the PATH env var before starting Sugar, as this is something that distro people will mess with and may be better to avoid increasing the number of things that may go wrong. Perhaps the python lib has a facility to specify a custom set of dir paths?

comment:3 follow-up: Changed 15 years ago by sascha_silbe

Yeah, I would prefer if we used python's implementation for finding a binary to execute rather than cooking our own. Though I'm unsure about setting the PATH env var before starting Sugar, as this is something that distro people will mess with and may be better to avoid increasing the number of things that may go wrong.

How about setting it in the "sugar" script?

Perhaps the python lib has a facility to specify a custom set of dir paths?

Unfortunately not, that's why my patch is so convoluted.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 15 years ago by tomeu

Replying to sascha_silbe:

Yeah, I would prefer if we used python's implementation for finding a binary to execute rather than cooking our own. Though I'm unsure about setting the PATH env var before starting Sugar, as this is something that distro people will mess with and may be better to avoid increasing the number of things that may go wrong.

How about setting it in the "sugar" script?

Yeah, I think that's fine. This may help as well with instructions for the command line, as all distros where Sugar runs will have /usr/sbin in PATH.

comment:5 in reply to: ↑ 4 Changed 15 years ago by tomeu

Replying to tomeu:

Replying to sascha_silbe:

Yeah, I would prefer if we used python's implementation for finding a binary to execute rather than cooking our own. Though I'm unsure about setting the PATH env var before starting Sugar, as this is something that distro people will mess with and may be better to avoid increasing the number of things that may go wrong.

How about setting it in the "sugar" script?

Yeah, I think that's fine. This may help as well with instructions for the command line, as all distros where Sugar runs will have /usr/sbin in PATH.

Bad chose of words. What I wanted to say is by setting the PATH env var in the sugar script, the effective PATH in the terminal activity will include /usr/sbin on all distros, so the same examples will work.

Changed 15 years ago by sascha_silbe

locate wpa_passphrase using PATH; append /sbin and /usr/sbin to PATH in "sugar"

comment:6 Changed 15 years ago by sascha_silbe

  • Keywords r? added; r- removed

comment:7 Changed 15 years ago by tomeu

  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

Pushed, thanks!

comment:8 Changed 11 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.