From 2611ad83ba7e4bfce214e55607f5fc86d4cbc773 Mon Sep 17 00:00:00 2001 From: EricLee Date: Mon, 25 Aug 2014 18:19:23 +0800 Subject: [PATCH] Add ifplugd daemon so that dhcp will update lease when Ethernet cable re-plugged --- recipes-connectivity/ifplugd/files/ifplugd.conf | 42 ++++++++++++++++++++++ recipes-connectivity/ifplugd/ifplugd_0.28.bb | 23 ++++++++++++ .../packagegroup-arago-smarct335x-sdk.bb | 1 + 3 files changed, 66 insertions(+) create mode 100644 recipes-connectivity/ifplugd/files/ifplugd.conf create mode 100644 recipes-connectivity/ifplugd/ifplugd_0.28.bb diff --git a/recipes-connectivity/ifplugd/files/ifplugd.conf b/recipes-connectivity/ifplugd/files/ifplugd.conf new file mode 100644 index 0000000..1e0f83a --- /dev/null +++ b/recipes-connectivity/ifplugd/files/ifplugd.conf @@ -0,0 +1,42 @@ +# -*-sh-*- +# $Id: ifplugd.conf 43 2003-09-13 11:25:11Z lennart $ + +# This file is part of ifplugd. +# +# ifplugd is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# ifplugd is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with ifplugd; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +# ifplugd configuration file + +# Please note that this is a bourne shell fragment sourced by the +# init script of ifplugd. + +# Specify the interfaces to control here, separated by spaces. +# Ifplugd processes will be started for each of these interfaces when +# the ifplugd init script is called with the "start" argument. You may +# use the magic string "auto" to make the init script start or stop +# ifplugd processes for ALL eth and wlan interfaces that are available +# according to /proc/net/dev. Note that the list of interfaces +# appearing in /proc/net/dev may depend on which kernel modules you +# have loaded. +INTERFACES="eth0" + +# Additional parameters for ifplugd. +# (Run "ifplugd -h" for further information.) +ARGS="-fwI -u0 -d10" + +# Additional parameters for ifplugd for the specified interface. Note +# that $ARGS is ignored, when a variable like this is set for an +# interface +#ARGS_wlan0="-MwI -u5 -d5" diff --git a/recipes-connectivity/ifplugd/ifplugd_0.28.bb b/recipes-connectivity/ifplugd/ifplugd_0.28.bb new file mode 100644 index 0000000..3173d69 --- /dev/null +++ b/recipes-connectivity/ifplugd/ifplugd_0.28.bb @@ -0,0 +1,23 @@ +LICENSE = "GPLv2" +SUMMARY = "Daemon for monitoring ethernet device link state" +DEPENDS = "libdaemon" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "http://0pointer.de/lennart/projects/ifplugd/ifplugd-${PV}.tar.gz;name=u1 \ + file://ifplugd.conf" + +SRC_URI[u1.md5sum] = "df6f4bab52f46ffd6eb1f5912d4ccee3" +SRC_URI[u1.sha256sum] = "474754ac4ab32d738cbf2a4a3e87ee0a2c71b9048a38bdcd7df1e4f9fd6541f0" + +EXTRA_OECONF_append = "--disable-lynx" + + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "${PN}" +INITSCRIPT_PARAMS_${PN} = "defaults 90" + +do_install_append() { + install -m 644 ${WORKDIR}/ifplugd.conf ${D}${sysconfdir}/ifplugd/ +} + +inherit autotools update-rc.d diff --git a/recipes-core/packagegroups/packagegroup-arago-smarct335x-sdk.bb b/recipes-core/packagegroups/packagegroup-arago-smarct335x-sdk.bb index 8129960..fb2c151 100644 --- a/recipes-core/packagegroups/packagegroup-arago-smarct335x-sdk.bb +++ b/recipes-core/packagegroups/packagegroup-arago-smarct335x-sdk.bb @@ -18,5 +18,6 @@ RDEPENDS_${PN} = "\ git \ cronie \ rsyslog \ + ifplugd \ gcc \ " -- 1.9.1