blob: aa133d8153d90fa098426634f4e29c6184d50856 [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
7#let cfg=cfg+1
8#if[$cfg]=...; ip[$cfg]=...; ipmask[$cfg]=.../...; gw[$cfg]=...; net[$cfg]=... dns[$cfg]=...
9
10exec >/dev/null
11#exec >"$0.out" # debug
12exec 2>&1
13
14test "$interface" || exit 1
15test "$ip" || exit 1
16
17{
18echo "let cfg=cfg+1"
19test "$interface" && echo "if[\$cfg]='$interface'"
20test "$ip" && echo "ip[\$cfg]='$ip'"
21test "$ip" && echo "ipmask[\$cfg]='$ip/16'"
22} >"$1"