remove defective script

This commit is contained in:
Torben Haack 2024-10-10 07:32:34 +02:00
parent f03cce703a
commit 3a4f68147d

View File

@ -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