]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/openswan-2.4.9-startklips-1.patch
Den "neuen" Kernel entfernt.
[people/pmueller/ipfire-2.x.git] / src / patches / openswan-2.4.9-startklips-1.patch
CommitLineData
9ced24a8
MT
1--- /usr/lib/ipsec/_startklips_old 2007-07-16 04:14:15.000000000 +0000
2+++ /usr/lib/ipsec/_startklips 2007-07-19 22:12:37.000000000 +0000
3@@ -104,23 +104,23 @@
4
5 # figure out ifconfig for interface
6 addr=
7- eval `ifconfig $phys |
8- awk '$1 == "inet" && $2 ~ /^addr:/ && $NF ~ /^Mask:/ {
9- gsub(/:/, " ", $0)
10- print "addr=" $3
11- other = $5
12- if ($4 == "Bcast")
13- print "type=broadcast"
14- else if ($4 == "P-t-P")
15- print "type=pointopoint"
16- else if (NF == 5) {
17- print "type="
18- other = ""
19- } else
20- print "type=unknown"
21- print "otheraddr=" other
22- print "mask=" $NF
23- }'`
c03dce35 24+ eval `ip addr show $phys | awk '$1 == "inet" { gsub(/\//, " ");
9ced24a8
MT
25+ print "addr=" $2;
26+ print "mask=" $3;
27+ print "otheraddr=" $5;
28+ }'`
c03dce35 29+ eval `ip addr show $phys | awk '$3 ~ /BROADCAST|POINTTOPOINT/ {
9ced24a8
MT
30+ if ($3 ~ /BROADCAST/)
31+ print "type=broadcast";
32+ else if ($3 ~ /POINTTOPOINT/)
33+ print "type=pointtopoint";
34+ else {
35+ print "type=";
36+ print "otheraddr=";
37+ }
38+ }'`
39+ eval `whatmask /$mask | awk -F': ' '$1 ~ /^Netmask =/ { print "mask=" $2 }'`
40+
41 if test " $addr" = " "
42 then
43 echo "unable to determine address of \`$phys'"
44@@ -129,7 +129,7 @@
45 if test " $type" = " unknown"
46 then
47 echo "\`$phys' is of an unknown type"
48- exit 1
49+ exit 1
50 fi
51 if test " $omtu" != " "
52 then