Add update_over_cellular crosh command.
This patch adds a new update_over_cellular crosh command to enable,
disable and get the status of the update over cellular network user
preference.
BUG=chromium:213401
TEST=Ran the command in crosh with "enabled", "disabled" and no arguments.
Change-Id: Ie71a9538a94508a7cafff7b26bf3edd5e808066a
Reviewed-on: https://gerrit.chromium.org/gerrit/60721
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/crosh b/crosh
index 81d5606..a3f52dc 100755
--- a/crosh
+++ b/crosh
@@ -154,6 +154,10 @@
tracepath [-n] <destination>[/port]
Trace the path/route to a network host.
+ update_over_cellular [enable|disable]
+ Enables or disables the auto updates over cellular networks. Run without
+ arguments to see the current state.
+
wpa_debug [<debug_level>] [--help] [--list_valid_level] [--reset]
Set wpa_supplicant debugging level.
@@ -958,6 +962,30 @@
fi
}
+cmd_update_over_cellular() {
+ case "$1" in
+ "enable")
+ param="-update_over_cellular=yes"
+ ;;
+
+ "disable")
+ param="-update_over_cellular=no"
+ ;;
+
+ "")
+ param=""
+ ;;
+
+ *)
+ echo "Usage: update_over_cellular [enable|disable]
+ Enables or disables the auto updates over cellular networks. Run without
+ arguments to see the current state."
+ return 1
+ ;;
+ esac
+ /usr/bin/update_engine_client $param -show_update_over_cellular
+}
+
cmd_tpcontrol() {
/opt/google/touchpad/tpcontrol "$@"
}