diff options
Diffstat (limited to 'packages/openslug-init')
-rw-r--r-- | packages/openslug-init/openslug-init-0.10/kern_header.c | 0 | ||||
-rw-r--r-- | packages/openslug-init/openslug-init-0.10/sysconfsetup | 34 | ||||
-rw-r--r-- | packages/openslug-init/openslug-init_0.10.bb | 29 |
3 files changed, 63 insertions, 0 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/kern_header.c b/packages/openslug-init/openslug-init-0.10/kern_header.c new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/openslug-init/openslug-init-0.10/kern_header.c diff --git a/packages/openslug-init/openslug-init-0.10/sysconfsetup b/packages/openslug-init/openslug-init-0.10/sysconfsetup index e69de29bb2..1b5b901708 100644 --- a/packages/openslug-init/openslug-init-0.10/sysconfsetup +++ b/packages/openslug-init/openslug-init-0.10/sysconfsetup @@ -0,0 +1,34 @@ +#!/bin/sh +if [ ! -e /etc/linksysconf ] +then + +# Ok this may be a little hack for now +# but Make sure the kernel module info is updated +# So the driver can actually load the first time + /usr/sbin/update-modules + + dd if=/dev/mtdblock1 of=/etc/linksysconf + cat <<EOF > /etc/interfaces +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +iface eth0 inet static +EOF + + strings /etc/linksysconf | grep ip_addr >> /etc/interfaces + strings /etc/linksysconf | grep ^netmask >> /etc/interfaces + strings /etc/linksysconf | grep hw_addr >> /etc/interfaces + sed -i -e 's/ip_addr=/ address /' /etc/interfaces + sed -i -e 's/netmask=/ netmask /' /etc/interfaces + sed -i -e 's/hw_addr=/ hwaddress ether /' /etc/interfaces + + mv /etc/network/interfaces /etc/network/interfaces.old + cp /etc/interfaces /etc/network/interfaces +# mv /etc/interfaces /etc/network/interfaces + echo "Configured /etc/network/interfaces with IP Static linksysconf Information" +fi + +modprobe ixp425_eth diff --git a/packages/openslug-init/openslug-init_0.10.bb b/packages/openslug-init/openslug-init_0.10.bb index e69de29bb2..57871a934c 100644 --- a/packages/openslug-init/openslug-init_0.10.bb +++ b/packages/openslug-init/openslug-init_0.10.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Openslug initial network config via sysconf" +SECTION = "console/network" +LICENSE = "GPL" +DEPENDS = "base-files" +PR = "r2" + +SRC_URI = "file://sysconfsetup \ + file://kern_header.c" + +inherit autotools update-rc.d + +INITSCRIPT_NAME = "sysconfsetup" +INITSCRIPT_PARAMS = "defaults 39" + +do_compile() { + ${CC} -o ${S}/../kern_header ${S}/../kern_header.c +} + +do_install() { + install -d ${D}/${sysconfdir} \ + ${D}/${sysconfdir}/init.d \ + ${D}/${sysconfdir}/rcS.d \ + ${D}/${sbindir} + + + install -m 0755 ${D}/../kern_header ${D}/${sbindir}/kern_header + install -m 0755 ${D}/../sysconfsetup ${D}/${sysconfdir}/init.d/ + ln -s /etc/init.d/sysconfsetup ${D}/${sysconfdir}/rcS.d/S39sysconfsetup +} |