aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin
diff options
context:
space:
mode:
authorDavid Pinilla Caparrós <dpinitux@gmail.com>2017-01-30 15:44:05 +0100
committerJohn Crispin <john@phrozen.org>2017-02-13 10:24:32 +0100
commita896611acd540411b7520ded6e8c99c6bb57556f (patch)
treea15407a97b5d7e291fe15742d3dd740ea7df29a5 /package/base-files/files/sbin
parentf6d3ea8c8a28bb51668367876df6ad93a5988827 (diff)
downloadupstream-a896611acd540411b7520ded6e8c99c6bb57556f.tar.gz
upstream-a896611acd540411b7520ded6e8c99c6bb57556f.tar.bz2
upstream-a896611acd540411b7520ded6e8c99c6bb57556f.zip
base-files: Added a deprecation notice on wifi detect
When running wifi detect, the user will be told on error output that wifi detect is deprecated, that wifi config must be used instead. Also the commit that changes it is referenced for further info. Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-xpackage/base-files/files/sbin/wifi8
1 files changed, 7 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index c65cb5ed99..83befc0d6f 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -145,6 +145,12 @@ wifi_reload() {
wifi_reload_legacy
}
+wifi_detect_notice() {
+ >&2 echo "WARNING: Wifi detect is deprecated. Use wifi config instead"
+ >&2 echo "For more information, see commit 5f8f8a366136a07df661e31decce2458357c167a"
+ exit 1
+}
+
wifi_config() {
[ ! -f /etc/config/wireless ] && touch /etc/config/wireless
@@ -229,7 +235,7 @@ scan_wifi
case "$1" in
down) wifi_updown "disable" "$2";;
- detect) ;;
+ detect) wifi_detect_notice ;;
config) wifi_config ;;
status) ubus_wifi_cmd "status" "$2";;
reload) wifi_reload "$2";;