1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-18 19:13:51 +01:00
AnnsAnn 55fa531e02 examples: restructure to use subfolders based on README structure
examples: Fix incorrect category heading

examples: shorten coap folder name

static-tests/examples: check subfolders for entries

ci/test_native: Adjust to new examples structure

examples: adjust makefiles to new structure

ci/tests: Fix symlinks to point towards proper examples
2025-02-13 11:54:09 +01:00

37 lines
1.1 KiB
Bash
Executable File

#! /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" ] || [ "${BOARD}" = "native64" ]; 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" ] || [ "${BOARD}" = "native64" ]; 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