#!/bin/sh

. /lib/functions.sh

IFNAME="eth0"

if [ ! "$(uci_get "network" "$IFNAME")" > /dev/null ]; then
	uci_add "network" "interface" "$IFNAME"
	uci_set "network" "$IFNAME" "ifname" "$IFNAME"
	uci_set "network" "$IFNAME" "proto" "static"
	uci_set "network" "$IFNAME" "ipaddr" "169.254.4.1"
	uci_set "network" "$IFNAME" "netmask" "255.255.0.0"
	uci_set "network" "$IFNAME" "invisible" "1"
	uci_set "network" "$IFNAME" "ipv6" "1"
	uci_commit network
fi

exit 1
