diff options
Diffstat (limited to 'meta/recipes-core/ifupdown/files')
3 files changed, 160 insertions, 0 deletions
diff --git a/meta/recipes-core/ifupdown/files/99_network b/meta/recipes-core/ifupdown/files/99_network new file mode 100644 index 0000000000..42d5895d75 --- /dev/null +++ b/meta/recipes-core/ifupdown/files/99_network @@ -0,0 +1 @@ +d root root 0755 /run/network none diff --git a/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch b/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch new file mode 100644 index 0000000000..8c4d953a28 --- /dev/null +++ b/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch @@ -0,0 +1,56 @@ +From 7af9db748974cb3a2c6ef8f9e03d7db1f9f8ee16 Mon Sep 17 00:00:00 2001 +From: Paul Gortmaker <paul.gortmaker@windriver.com> +Date: Wed, 6 Aug 2014 14:54:12 -0400 +Subject: [PATCH 1/2] defn2[c|man]: don't rely on dpkg-architecture to set arch + +In yocto we'll always be cross compiling, and we'll always +be building on linux for linux (vs. *BSD, hurd, etc.) + +Without this the arch is not detected, but it doesn't error +out, and hence you get useless binaries that don't know any +arch specific methods, and the end result will be strangeness +like the loopback device not being configured/enabled. + +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> +--- + defn2c.pl | 6 +++--- + defn2man.pl | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/defn2c.pl b/defn2c.pl +index c449de2f3d1c..38845e374c76 100755 +--- a/defn2c.pl ++++ b/defn2c.pl +@@ -2,9 +2,9 @@ + + use strict; + +-my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`; +- +-$DEB_HOST_ARCH_OS =~ s/\n//; ++#my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`; ++#$DEB_HOST_ARCH_OS =~ s/\n//; ++my $DEB_HOST_ARCH_OS ="linux"; + + # declarations + my $address_family = ""; +diff --git a/defn2man.pl b/defn2man.pl +index 6ddcfdd4fe68..c9c4dd046597 100755 +--- a/defn2man.pl ++++ b/defn2man.pl +@@ -2,9 +2,9 @@ + + use strict; + +-my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`; +- +-$DEB_HOST_ARCH_OS =~ s/\n//; ++#my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`; ++#$DEB_HOST_ARCH_OS =~ s/\n//; ++my $DEB_HOST_ARCH_OS = "linux"; + + # declarations + my $line; +-- +1.9.1 + diff --git a/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch b/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch new file mode 100644 index 0000000000..bff352e3af --- /dev/null +++ b/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch @@ -0,0 +1,103 @@ +From 74152ac74a3e1ea0f3be292aa1eeca5ad1fe69c0 Mon Sep 17 00:00:00 2001 +From: Paul Gortmaker <paul.gortmaker@windriver.com> +Date: Wed, 6 Aug 2014 15:12:11 -0400 +Subject: [PATCH 2/2] inet[6].defn: fix inverted checks for loopback + +Compared to the hurd link.defn for loopback, we see these +are inverted, meaning that you would only be able to configure +a loopback device that was _not_ named "lo" (unlikely to exist). + +The result was that we'd update /run/network/ifstate for "lo" +but never actually do anything for up/down, as shown below: + +root@localhost:~# ifconfig -s +Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg +eth0 1500 0 7736329 0 2016 0 5289422 0 0 0 BMRU +lo 65536 0 18 0 0 0 18 0 0 0 LRU +root@localhost:~# ifdown lo +root@localhost:~# echo $? +0 +root@localhost:~# ifconfig -s +Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg +eth0 1500 0 7736406 0 2016 0 5289455 0 0 0 BMRU +lo 65536 0 18 0 0 0 18 0 0 0 LRU +root@localhost:~# ifconfig lo down +root@localhost:~# ifconfig -s +Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg +eth0 1500 0 7736474 0 2016 0 5289481 0 0 0 BMRU +root@localhost:~# + +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> +--- + inet.defn | 12 ++++++------ + inet6.defn | 8 ++++---- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/inet.defn b/inet.defn +index b176ab4ed03e..5fdfb14a0e1c 100644 +--- a/inet.defn ++++ b/inet.defn +@@ -6,10 +6,10 @@ method loopback + This method may be used to define the IPv4 loopback interface. + + up +- ip link set dev %iface% up if (!iface_is_lo()) ++ ip link set dev %iface% up if (iface_is_lo()) + + down +- ip link set dev %iface% down if (!iface_is_lo()) ++ ip link set dev %iface% down if (iface_is_lo()) + + method static + description +@@ -212,11 +212,11 @@ method loopback + + up + ifconfig %iface% 127.0.0.1 up \ +- if (!iface_is_lo()) ++ if (iface_is_lo()) + + down + ifconfig %iface% down \ +- if (!iface_is_lo()) ++ if (iface_is_lo()) + + method static + description +@@ -371,11 +371,11 @@ method loopback + + up + inetutils-ifconfig --interface %iface% --address 127.0.0.1 --up \ +- if (!iface_is_lo()) ++ if (iface_is_lo()) + + down + inetutils-ifconfig --interface %iface% --down \ +- if (!iface_is_lo()) ++ if (iface_is_lo()) + + method static + description +diff --git a/inet6.defn b/inet6.defn +index 09325539cd01..4df64aff38cc 100644 +--- a/inet6.defn ++++ b/inet6.defn +@@ -33,11 +33,11 @@ method loopback + description + This method may be used to define the IPv6 loopback interface. + up +- -ip link set dev %iface% up 2>/dev/null if (!iface_is_lo()) +- -ip addr add dev %iface% ::1 2>/dev/null if (!iface_is_lo()) ++ -ip link set dev %iface% up 2>/dev/null if (iface_is_lo()) ++ -ip addr add dev %iface% ::1 2>/dev/null if (iface_is_lo()) + down +- -ip addr del dev %iface% ::1 2>/dev/null if (!iface_is_lo()) +- -ip link set dev %iface% down 2>/dev/null if (!iface_is_lo()) ++ -ip addr del dev %iface% ::1 2>/dev/null if (iface_is_lo()) ++ -ip link set dev %iface% down 2>/dev/null if (iface_is_lo()) + + method static + description +-- +1.9.1 + |