#!/bin/sh
# ether - bring up wired interface

ETH=$(ip link show | awk -F: '/^[0-9]+: en|^[0-9]+: eth/ {print $2; exit}' | tr -d ' ')

[ -n "$ETH" ] || { echo "ether: no wired interface found"; exit 1; }

echo "ether: bringing up $ETH"
ip link set lo up
ip link set "$ETH" up

touch /run/sv/ready/ether
# ether is ready
exec sleep inf

