Debian Codegraph @

examples/var_service/zcip_if/convert2ipconf

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # convert:
3
4 #interface=eth1
5 #ip=169.254.x.y
6
7 # into:
8
9 #let cfg=cfg+1
10 #if[$cfg]=...; ip[$cfg]=...; ipmask[$cfg]=.../...; gw[$cfg]=...; net[$cfg]=... dns[$cfg]=...
11
12 exec >/dev/nullscip-shell filesystem . . `/dev/null`.
13 #exec >"$0.out" # debug
14 exec 2>&1
15
16 testscip-shell system . . test. "$interface" || exit 1
17 testscip-shell system . . test. "$ip" || exit 1
18
19 {
20 echoscip-shell system . . echo. "let cfg=cfg+1"
21 testscip-shell system . . test. "$interface" && echoscip-shell system . . echo. "if[\$cfg]='$interface'"
22 testscip-shell system . . test. "$ip" && echoscip-shell system . . echo. "ip[\$cfg]='$ip'"
23 testscip-shell system . . test. "$ip" && echoscip-shell system . . echo. "ipmask[\$cfg]='$ip/16'"
24 } >"$1"