summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/network b/src/network
index e1a57a2..5823411 100644
--- a/src/network
+++ b/src/network
@@ -265,12 +265,28 @@ quirk() {
#
interface_down()
{
- local status=$(check_iface "$1")
- case "$status" in
- disabled) return 0 ;;
- "") return 0 ;;
+ local profile=$(check_iface "$1")
+ case "$profile" in
+ ""|disabled) return 0 ;;
external) return 1 ;;
- *) profile_down "$status" ;;
+ *) profile_down "$profile" ;;
+ esac
+}
+
+
+# interface_reconnect interface
+# reconnects the profile active on interface
+interface_reconnect()
+{
+ local profile=$(check_iface "$1")
+ case "$profile" in
+ ""|disabled|external)
+ return 1
+ ;;
+ *)
+ profile_down "$profile"
+ profile_up "$profile"
+ ;;
esac
}