Ticket #998: sugar-wpa_passphrase-PATH.patch

File sugar-wpa_passphrase-PATH.patch, 1.0 KB (added by sascha_silbe, 13 years ago)

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

  • bin/sugar.in

    diff --git a/bin/sugar.in b/bin/sugar.in
    index 7b5ca25..d1ebeae 100644
    a b if test -z "$SUGAR_SCALING"; then 
    55fi
    66
    77export GTK2_RC_FILES="@prefix@/share/sugar/data/sugar-$SUGAR_SCALING.gtkrc"
     8export PATH="$PATH":/sbin:/usr/sbin
    89
    910if ! test -f "$GTK2_RC_FILES"; then
    1011    echo "sugar: ERROR: Gtk theme for scaling $SUGAR_SCALING not available in path $GTK2_RC_FILES"
  • src/jarabe/desktop/keydialog.py

    diff --git a/src/jarabe/desktop/keydialog.py b/src/jarabe/desktop/keydialog.py
    index 93f07c4..b9b229b 100644
    a b class WPAKeyDialog(KeyDialog): 
    239239        elif len(key) >= 8 and len(key) <= 63:
    240240            # passphrase
    241241            from subprocess import Popen, PIPE
    242             p = Popen(['/usr/sbin/wpa_passphrase', ssid, key], stdout=PIPE)
     242            p = Popen(['wpa_passphrase', ssid, key], stdout=PIPE)
    243243            for line in p.stdout:
    244244                if line.strip().startswith("psk="):
    245245                    real_key = line.strip()[4:]