blob: c858723fb80d5bdeece9bda479a991f777f35643 [file] [log] [blame]
Denys Vlasenkod32a1a42015-10-24 05:30:58 +02001#!/bin/sh
2# convert:
3
4#interface=eth1
5#ip=169.254.x.y
6
Denys Vlasenkobf1866c2015-10-24 18:57:32 +02007# into:
8
Denys Vlasenkod32a1a42015-10-24 05:30:58 +02009#let cfg=cfg+1
10#if[$cfg]=...; ip[$cfg]=...; ipmask[$cfg]=.../...; gw[$cfg]=...; net[$cfg]=... dns[$cfg]=...
11
12exec >/dev/null
13#exec >"$0.out" # debug
14exec 2>&1
15
16test "$interface" || exit 1
17test "$ip" || exit 1
18
19{
20echo "let cfg=cfg+1"
21test "$interface" && echo "if[\$cfg]='$interface'"
22test "$ip" && echo "ip[\$cfg]='$ip'"
23test "$ip" && echo "ipmask[\$cfg]='$ip/16'"
24} >"$1"