Skip to content

Commit

Permalink
Crude fix for multiple interfaces (#1106)
Browse files Browse the repository at this point in the history
I ran into an issue that `armbianmonitor -N` and `-n` spit out an `sed` error message and noticed this is caused when multiple network interfaces (like additional `tun`) are detected.
This is a quick and dirty fix and just grabs the first result to make it work.
  • Loading branch information
EvilOlaf authored and Thomas Kaiser committed Sep 11, 2018
1 parent 4dcceb3 commit 00d44fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bsp/common/usr/bin/armbianmonitor
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ NetworkMonitorMode() {
trap "echo ; exit 0" 0 1 2 3 15
timerStart
kickAllStatsDown
iface=$(route -n | egrep UG | egrep -o "[a-zA-Z0-9]*$")
iface=$(route -n | egrep UG | egrep -o "[a-zA-Z0-9]*$" | head -n 1)

printf "\nruntime network statistics: $(uname -n)\n"
printf "[tap 'd' to display column headings]\n"
Expand Down

0 comments on commit 00d44fe

Please sign in to comment.