From 3a4f68147dc01bdc3c327679d32c8c3d20b1f114 Mon Sep 17 00:00:00 2001 From: Torben Haack Date: Thu, 10 Oct 2024 07:32:34 +0200 Subject: [PATCH] remove defective script --- .../scripts/switch_network.sh | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100755 packages/reservation-platform/scripts/switch_network.sh diff --git a/packages/reservation-platform/scripts/switch_network.sh b/packages/reservation-platform/scripts/switch_network.sh deleted file mode 100755 index 997ee61..0000000 --- a/packages/reservation-platform/scripts/switch_network.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Function to show the current state -show_current_state() { - if ip link show eth0 | grep -q "UP"; then - echo "Current state: Ethernet and MACVLAN active, Wi-Fi inactive" - else - echo "Current state: Wi-Fi active, Ethernet and MACVLAN inactive" - fi -} - -# Show the current state -show_current_state - -# Check the current state by examining the status of Ethernet (eth0) -if ip link show eth0 | grep -q "UP"; then - echo "Switching to Wi-Fi mode..." - echo "Deactivating: Ethernet (eth0) and MACVLAN interfaces" - ip link set macvlan0 down - ip link set macvlan1 down - ip link set eth0 down - echo "Activating: Wi-Fi (wlan0)" - ip link set wlan0 up -else - echo "Switching to Ethernet and MACVLAN mode..." - echo "Deactivating: Wi-Fi (wlan0)" - ip link set wlan0 down - echo "Activating: Ethernet (eth0) and MACVLAN interfaces" - ip link set eth0 up - ip link set macvlan1 up - ip link set macvlan0 up -fi - -# Show the new state -echo "" -echo "Switch completed." -show_current_state