ifupdown: update to 0.6.10 and do not ship /etc/network/interfaces
authorMarcin Juszkiewicz <marcin@buglabs.net>
Wed, 31 Mar 2010 13:43:29 +0000 (15:43 +0200)
committerMarcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Wed, 31 Mar 2010 13:47:33 +0000 (15:47 +0200)
Init script was renamed to ifup like it is in ifupdown-ubuntu

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
recipes/ifupdown/ifupdown-0.6.10/busybox.patch [moved from recipes/ifupdown/ifupdown-0.6.8/busybox.patch with 100% similarity]
recipes/ifupdown/ifupdown-0.6.10/head-tail.patch [moved from recipes/ifupdown/ifupdown-0.6.8/head-tail.patch with 100% similarity]
recipes/ifupdown/ifupdown-0.6.10/init [moved from recipes/ifupdown/ifupdown-0.6.8/init with 100% similarity]
recipes/ifupdown/ifupdown-0.6.10/zeroconf.patch [moved from recipes/ifupdown/ifupdown-0.6.8/zeroconf.patch with 100% similarity]
recipes/ifupdown/ifupdown-0.6.8/interfaces [deleted file]
recipes/ifupdown/ifupdown-0.6.8/udhcpc.patch [deleted file]
recipes/ifupdown/ifupdown_0.6.10.bb [moved from recipes/ifupdown/ifupdown_0.6.8.bb with 77% similarity]

diff --git a/recipes/ifupdown/ifupdown-0.6.8/interfaces b/recipes/ifupdown/ifupdown-0.6.8/interfaces
deleted file mode 100644 (file)
index f1bd92e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-auto lo
-iface lo inet loopback
diff --git a/recipes/ifupdown/ifupdown-0.6.8/udhcpc.patch b/recipes/ifupdown/ifupdown-0.6.8/udhcpc.patch
deleted file mode 100644 (file)
index 5b662e7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: ifupdown-0.6.8/inet.defn
-===================================================================
---- ifupdown-0.6.8.orig/inet.defn      2007-01-04 09:11:43.000000000 +0100
-+++ ifupdown-0.6.8/inet.defn   2007-01-04 09:12:51.000000000 +0100
-@@ -81,8 +81,7 @@
-         elsif (execable("/sbin/dhclient"))
-     pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \
-         elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100))
--    udhcpc -n -p /var/run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \
--           [[-c %client%]] \
-+    udhcpc -b -p /var/run/udhcpc.%iface%.pid -i %iface% -H `cat /etc/hostname` \
-         elsif (execable("/sbin/udhcpc") && mylinuxver() >= mylinux(2,2,0))
-     dhcpcd [[-h %hostname%]] [[-i %vendor%]] [[-I %client%]] \
-            [[-l %leasetime%]] %iface% \
-@@ -91,11 +90,11 @@
-   down
-     dhclient3 -r -pf /var/run/dhclient.%iface%.pid -lf /var/lib/dhcp3/dhclient.%iface%.leases %iface% \
-         if (execable("/sbin/dhclient3"))
--    cat /var/run/dhclient.%iface%.pid | xargs -i kill -TERM {} \
-+    kill -TERM `cat /var/run/dhclient.%iface%.pid` \
-         elsif (execable("/sbin/dhclient"))
-     pump -i %iface% -r \
-         elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100))
--    cat /var/run/udhcpc.%iface%.pid | xargs -i kill -TERM {} \
-+    kill -TERM `cat /var/run/udhcpc.%iface%.pid` \
-         elsif (execable("/sbin/udhcpc"))
-     dhcpcd -k %iface% \
-         elsif (execable("/sbin/dhcpcd"))
similarity index 77%
rename from recipes/ifupdown/ifupdown_0.6.8.bb
rename to recipes/ifupdown/ifupdown_0.6.10.bb
index 53ccb5f..6bc4f47 100644 (file)
@@ -8,13 +8,13 @@ SECTION = "base"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/i/ifupdown/ifupdown_${PV}.tar.gz \
            file://busybox.patch;patch=1 \
-           file://udhcpc.patch;patch=1 \
            file://zeroconf.patch;patch=1 \
-           file://init \
-           file://interfaces"
+           file://init "
 
 EXTRA_OEMAKE = ""
 
+inherit update-rc.d
+
 do_compile () {
        chmod a+rx *.pl *.sh
        oe_runmake 'CC=${CC}' "CFLAGS=${CFLAGS} -Wall -W -D'IFUPDOWN_VERSION=\"${PV}\"'"
@@ -22,15 +22,17 @@ do_compile () {
 
 do_install () {
        install -d ${D}${sysconfdir}/init.d \
-                  ${D}${sysconfdir}/network \
+                  ${D}${sysconfdir}/network/run/
                   ${D}${mandir}/man8 \
                   ${D}${mandir}/man5 \
                   ${D}${base_sbindir}
        install -m 0755 ifup ${D}${base_sbindir}/
        ln ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifdown
-       install -m 0644 ${WORKDIR}/init ${D}${sysconfdir}/init.d/networking
-       install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces
+       install -m 0644 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ifup
        install -m 0644 ifup.8 ${D}${mandir}/man8
        install -m 0644 interfaces.5 ${D}${mandir}/man5
        cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
 }
+
+INITSCRIPT_NAME = "ifup"
+INITSCRIPT_PARAMS = "start 39 S . stop 39 0 6 1 ."