modem: Add set_madison_config command.

Add a command to set the contents of /var/cache/cromo/madison-config-group.
This lets users toggle between the old and new Verizon portals.

BUG=chromium-os:21589
TEST=Adhoc, sets the file

Change-Id: I1450ca9450d1ee0139e91a981e4f5925a202ca45
Reviewed-on: http://gerrit.chromium.org/gerrit/10044
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
Commit-Ready: ttuttle <ttuttle@chromium.org>
diff --git a/modem b/modem
index 3c51ab0..f0e4978 100755
--- a/modem
+++ b/modem
@@ -201,6 +201,19 @@
 	    "string:$carrier"
 }
 
+MADISON_CONFIG_GROUP_LOCATION=/var/lib/cromo/madison-config-group;
+
+set_madison_config () {
+	group="$*";
+
+	echo Setting madison config group to "$group".
+
+	echo "$group" > $MADISON_CONFIG_GROUP_LOCATION;
+
+	echo "You will need to restart cromo to use the new configuration."
+	echo "Reboot, or run 'restart cromo' from a root shell if you can.";
+}
+
 usage () {
 	echo "Usage: $0 <command> [args...]"
 	echo "  activate [-modem <modem>] [<carrier>]        Activate modem"
@@ -210,6 +223,7 @@
 	echo "  status                                       Display modem status"
 	echo "  update-prl [-modem <modem>] <prl-file-name>  Install a PRL file"
 	echo "  set-carrier [-modem <modem>] <carrier-name>  Set modem carrier firmware"
+	echo "  set-madison-config <config-group-name>       Set Madison config group"
 	exit 0
 }
 
@@ -236,6 +250,9 @@
 	set-carrier)
 		set_carrier "$@"
 		;;
+	set-madison-config)
+		set_madison_config "$@"
+		;;
 	*)
 		usage
 		;;