Merge lp:~toykeeper/phablet-tools/phablet-network-no-nm into lp:phablet-tools

Proposed by Selene ToyKeeper
Status: Merged
Approved by: Oliver Grawert
Approved revision: 338
Merged at revision: 357
Proposed branch: lp:~toykeeper/phablet-tools/phablet-network-no-nm
Merge into: lp:phablet-tools
Diff against target: 35 lines (+7/-3)
1 file modified
phablet-network (+7/-3)
To merge this branch: bzr merge lp:~toykeeper/phablet-tools/phablet-network-no-nm
Reviewer Review Type Date Requested Status
Robert Bruce Park (community) Approve
PS Jenkins bot continuous-integration Approve
Oliver Grawert Approve
Review via email: mp+251564@code.launchpad.net

Commit message

This fixes Bug #1427559 (phablet-network requires NetworkManager).

It adds support for an optional dotfile to specify the data the script would otherwise try to detect from NetworkManager. With no dotfile, the script acts the same as before, but by adding a dotfile it allows people to use phablet-network in half a dozen corner cases which would otherwise fail.

Description of the change

This fixes Bug #1427559 (phablet-network requires NetworkManager).

It adds support for an optional dotfile to specify the data the script would otherwise try to detect from NetworkManager. With no dotfile, the script acts the same as before, but by adding a dotfile it allows people to use phablet-network in half a dozen corner cases which would otherwise fail.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
337. By Selene ToyKeeper

reverted previous change, using a different method

338. By Selene ToyKeeper

Simpler, better method. Try CLI option, then default dotfile, then auto-detect.

Revision history for this message
Oliver Grawert (ogra) wrote :

looks good ...

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Bruce Park (robru) wrote :

Minor nitpick.

review: Needs Fixing
Revision history for this message
Robert Bruce Park (robru) wrote :

ooops, nm, lgtm.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'phablet-network'
--- phablet-network 2015-02-10 14:50:47 +0000
+++ phablet-network 2015-03-03 09:25:01 +0000
@@ -27,6 +27,7 @@
27usage: $0 [OPTIONS]27usage: $0 [OPTIONS]
2828
29Copies ACTIVE network manager connection into device29Copies ACTIVE network manager connection into device
30(or uses NM-format wifi config from $DEFAULT_NETWORK_FILE)
3031
31OPTIONS:32OPTIONS:
32 -h Show this message33 -h Show this message
@@ -42,6 +43,7 @@
42}43}
4344
44OPTION_NETWORK_FILE=""45OPTION_NETWORK_FILE=""
46DEFAULT_NETWORK_FILE="$HOME/.phablet-network"
45SKIP_SETUP=""47SKIP_SETUP=""
46SKIP_WAIT=""48SKIP_WAIT=""
47WAIT_TIMEOUT="80s"49WAIT_TIMEOUT="80s"
@@ -113,10 +115,12 @@
113}115}
114116
115setup_connection() {117setup_connection() {
116 if [ -z "$OPTION_NETWORK_FILE" ]; then118 if [ ! -z "$OPTION_NETWORK_FILE" ]; then
119 network_file="$OPTION_NETWORK_FILE"
120 elif [ -f "$DEFAULT_NETWORK_FILE" ]; then
121 network_file="$DEFAULT_NETWORK_FILE"
122 else
117 network_file="$(find_active_network)"123 network_file="$(find_active_network)"
118 else
119 network_file="$OPTION_NETWORK_FILE"
120 fi124 fi
121125
122 if [ ! -f "$network_file" ]126 if [ ! -f "$network_file" ]

Subscribers

People subscribed via source and target branches