blob: 79e18eb2b755c166901cd49a531dbd4ba806326a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
# code modified from:
# `man nmcli-examples` and Copyright 2012 Johannes Buchner <buchner.johannes@gmx.at> Copyright 2012 - 2014 Red Hat, Inc.
enable_disable_wifi ()
{
if nmcli -t --fields type,state device | grep -q 'ethernet:connected'; then
nmcli radio wifi off
else
nmcli radio wifi on
fi
}
case "$2" in
up|down) enable_disable_wifi;;
esac
|