fix die on clone mac failure

This commit is contained in:
Cyberes 2023-06-13 16:26:46 -06:00
parent 8b148fad11
commit 54ebfd1822
Signed by: cyberes
GPG Key ID: 6B4A33836A9500FE
2 changed files with 1 additions and 3 deletions

View File

@ -10,11 +10,9 @@ function get_client_mac_address() {
if [ -n "$MAC_ADDRESS" ]; then if [ -n "$MAC_ADDRESS" ]; then
echo "$MAC_ADDRESS" echo "$MAC_ADDRESS"
else else
echo "Could not find the MAC address of the connected device with IP address $TARGET_IP"
exit 1 exit 1
fi fi
else else
echo "Interface $ETH_IFACE is not plugged in."
exit 1 exit 1
fi fi
} }

View File

@ -38,7 +38,7 @@ while true; do
echo -e "--> Reset complete\n" echo -e "--> Reset complete\n"
elif [ "$STATUS" == "1" ]; then elif [ "$STATUS" == "1" ]; then
echo -e "\n----> Interface $ETH_IFACE has been plugged in." echo -e "\n----> Interface $ETH_IFACE has been plugged in."
# Clone the mac first so that when we give the client an IP they'll know we're ready to go # Clone the MAC first so that when we give the client an IP they'll know we're ready to go.
bash "$DIR/bridge/clone-client-mac.sh" bash "$DIR/bridge/clone-client-mac.sh"
echo "" echo ""
bash "$DIR/bridge/bridge-lan.sh" bash "$DIR/bridge/bridge-lan.sh"