Skip to content

Commit

Permalink
Use lan0's mac address when eth0 does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
RAKzhuqi committed Sep 19, 2019
1 parent 4e941e7 commit cf40e8f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ This project currently provides support for the below platforms.
* RAK7243

## Changelog
2019-09-19 V4.0.0
* Use lan0's mac address when eth0 does not exist.

2019-05-24 V2.9

Expand Down
3 changes: 3 additions & 0 deletions lora/rak2245/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ GATEWAY_EUI_NIC="eth0"
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="wlan0"
fi
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="usb0"
fi

if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
echo "ERROR: No network interface found. Cannot set gateway ID."
Expand Down
3 changes: 3 additions & 0 deletions lora/rak2247/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ GATEWAY_EUI_NIC="eth0"
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="wlan0"
fi
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="usb0"
fi

if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
echo "ERROR: No network interface found. Cannot set gateway ID."
Expand Down
3 changes: 3 additions & 0 deletions lora/rak7243/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ GATEWAY_EUI_NIC="eth0"
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="wlan0"
fi
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="usb0"
fi

if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
echo "ERROR: No network interface found. Cannot set gateway ID."
Expand Down
3 changes: 3 additions & 0 deletions rak/gateway-config
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,9 @@ do_get_gw_id()
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="wlan0"
fi
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="usb0"
fi

if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
echo ""
Expand Down
3 changes: 3 additions & 0 deletions rak/rak/shell_script/rak_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ do_get_gw_id()
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="wlan0"
fi
if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
GATEWAY_EUI_NIC="usb0"
fi

if [[ `grep "$GATEWAY_EUI_NIC" /proc/net/dev` == "" ]]; then
echo ""
Expand Down

0 comments on commit cf40e8f

Please sign in to comment.