Last change
on this file since 3861 was 3621, checked in by Bruno Cornec, 8 years ago |
New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.
|
-
Property svn:executable
set to
*
|
File size:
440 bytes
|
Rev | Line | |
---|
[3621] | 1 | #!/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/null
|
---|
| 13 | #exec >"$0.out" # debug
|
---|
| 14 | exec 2>&1
|
---|
| 15 |
|
---|
| 16 | test "$interface" || exit 1
|
---|
| 17 | test "$ip" || exit 1
|
---|
| 18 |
|
---|
| 19 | {
|
---|
| 20 | echo "let cfg=cfg+1"
|
---|
| 21 | test "$interface" && echo "if[\$cfg]='$interface'"
|
---|
| 22 | test "$ip" && echo "ip[\$cfg]='$ip'"
|
---|
| 23 | test "$ip" && echo "ipmask[\$cfg]='$ip/16'"
|
---|
| 24 | } >"$1"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.