
Add 'fallback' support. NetworkManager will attempt to brute-force connect to networks marked as fallback if there are no better wireless connections available. This is useful as a method of last resort, to work around driver problems, and for use with hidden networks. * gnome/applet/applet-dbus-devices.c, gnome/applet/applet-dbus-devices.h: Add fallback parameter. * gnome/applet/applet-dbus-info.c: Retrieve fallback bit from Gconf and pass it on via DBUS. * gnome/applet/applet.c: No fallback by default. * gnome/applet/applet.glade, gnome/applet/other-network-dialog.c: Update other-network-dialog to add UI checkbox toggling fallback. * src/NetworkManagerAP.c, src/NetworkManagerAP.h: Remove "trusted" propery from AP object. Add "fallback" property to AP object. * src/nm-dbus-nm.c: Grab the fallback parameter via DBUS. * src/nm-dbus-nmi.c: Grab the fallback parameter via DBUS. * src/nm-device-802-11-wireless.c: Break out blacklist logic into separate function. Add get_best_fallback_ap() for returning an AP on which to attempt fallback. * src/backends/NetworkManagerSuSE.c: Set stored network as fallback. * test/nm-set-fallback: New file. Sets a given network as fallback. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1814 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
28 lines
523 B
Bash
28 lines
523 B
Bash
#! /bin/sh
|
|
#
|
|
# nm-set-fallback - mark a network as fallback
|
|
#
|
|
# Robert Love
|
|
|
|
BIN=`which gconftool-2`
|
|
|
|
if [ "x$1" == "x" ]; then
|
|
echo "usage: $0 <network> <true|false>"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "x$2" != "xtrue" -a "x$2" != "xfalse" ]; then
|
|
echo "usage: $0 <network> <true|false>"
|
|
exit 2
|
|
fi
|
|
|
|
KEY="/system/networking/wireless/networks/${1}/fallback"
|
|
CURRENT=`$BIN --get $KEY 2>/dev/null`
|
|
|
|
if [ "x$CURRENT" != "xtrue" -a "x$CURRENT" != "xfalse" ]; then
|
|
echo "Network '$1' is not valid"
|
|
exit 3
|
|
fi
|
|
|
|
$BIN --set --type=bool $KEY ${2}
|