Skip to content

Commit

Permalink
Merge pull request #268 from kacf/pr265
Browse files Browse the repository at this point in the history
mender-device-identity: Check if file exists before reading
  • Loading branch information
kacf authored Jan 30, 2018
2 parents 018664e + 3d546c4 commit d24ea6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions support/mender-device-identity
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ ifdev=

# find iface with lowest ifindex, skip non ARPHRD_ETHER types (lo, sit ...)
for dev in $SCN/*; do
if [ ! -f "$dev/type" ]; then
continue
fi

iftype=$(cat $dev/type)
if [ $iftype -ne $arphrd_ether ]; then
continue
Expand Down

0 comments on commit d24ea6a

Please sign in to comment.