-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples/suit_update: adapt python test to native
- Loading branch information
Showing
4 changed files
with
92 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#! /bin/sh | ||
# | ||
# check_config.sh | ||
# Copyright (C) 2021 Martine Lenders <mail@martine-lenders.eu> | ||
# Copyright (C) 2022 Inria | ||
# | ||
# Distributed under terms of the MIT license. | ||
# | ||
|
||
ip link show dev "${IFACE}" > /dev/null | ||
RESULT=$? | ||
|
||
if [ $RESULT -eq 0 ]; then | ||
if [ "${BOARD}" = "native" ]; then | ||
IFACE_IPV6_ADDR=$(ip -6 addr show dev "${IFACE}"| grep inet6 | \ | ||
awk -F '[ \t]+|/' '{print $3}' | grep -v ^::1 | \ | ||
grep -v ^fe80) | ||
if [ -n "${IFACE_IPV6_ADDR}" ]; then | ||
exit 0 | ||
fi | ||
else | ||
exit 0 | ||
fi | ||
fi | ||
|
||
if [ "${BOARD}" = "native" ]; then | ||
echo "You may be able to create \"${IFACE}\" by using e.g." \ | ||
"\`${RIOTTOOLS#${RIOTBASE}/}/tapsetup/tapsetup\`." | ||
echo "You can add a routable IPV6 address by using e.g." \ | ||
"sudo ip address add 2001:db8::1/64 dev ${IFACE}" | ||
else | ||
echo "You may setup \"${IFACE}\" by using e.g." \ | ||
"\`${RIOTTOOLS#${RIOTBASE}/}/ethos/setup_network.sh ${IFACE} 2001:db8::/64\`" | ||
fi | ||
|
||
exit 1 |