1 --- _startklips.old 2008-09-07 00:50:40.000000000 +0200
2 +++ _startklips 2008-09-07 00:50:42.000000000 +0200
5 # figure out ifconfig for interface
7 - eval `ifconfig $phys |
8 - awk '$1 == "inet" && $2 ~ /^addr:/ && $NF ~ /^Mask:/ {
13 - print "type=broadcast"
14 - else if ($4 == "P-t-P")
15 - print "type=pointopoint"
20 - print "type=unknown"
21 - print "otheraddr=" other
24 + eval `ip addr show $phys | awk '$3 ~ /BROADCAST|POINTOPOINT/ {
25 + if ($3 ~ /BROADCAST/)
26 + print "type=broadcast";
27 + else if ($3 ~ /POINTOPOINT/)
28 + print "type=pointopoint";
34 + if [ "$type" == "broadcast" ]; then
35 + eval `ip addr show $phys | awk '$1 == "inet" { gsub(/\//, " ");
38 + print "otheraddr=" $5;
40 + elif [ "$type" == "pointopoint" ]; then
41 + eval `ip addr show $phys | awk '$1 == "inet" { gsub(/\//, " ");
44 + print "otheraddr=" $4;
51 + eval `whatmask /$mask | awk -F': ' '$1 ~ /^Netmask =/ { print "mask=" $2 }'`
53 if test " $addr" = " "
55 echo "unable to determine address of \`$phys'"
57 if test " $type" = " unknown"
59 echo "\`$phys' is of an unknown type"
63 if test " $omtu" != " "