Update path of command iptables in init script that we put it in /usr/sbin rather than /sbin. Then update bb file to install init script, configure and rules files.
Signed-off-by: Kai Kang <[email protected]> --- meta/recipes-extended/iptables/iptables/iptables.init | 4 ++-- meta/recipes-extended/iptables/iptables_1.4.21.bb | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/meta/recipes-extended/iptables/iptables/iptables.init b/meta/recipes-extended/iptables/iptables/iptables.init index 01057dd..3f9ce23 100755 --- a/meta/recipes-extended/iptables/iptables/iptables.init +++ b/meta/recipes-extended/iptables/iptables/iptables.init @@ -33,8 +33,8 @@ VAR_SUBSYS_IPTABLES=/var/lock/subsys/$IPTABLES # only usable for root [ $EUID = 0 ] || exit 4 -if [ ! -x /sbin/$IPTABLES ]; then - echo -n $"${IPTABLES}: /sbin/$IPTABLES does not exist."; warning; echo +if [ ! -x /usr/sbin/$IPTABLES ]; then + echo -n $"${IPTABLES}: /usr/sbin/$IPTABLES does not exist."; warning; echo exit 5 fi diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb index ba4e8e4..a6fe55f 100644 --- a/meta/recipes-extended/iptables/iptables_1.4.21.bb +++ b/meta/recipes-extended/iptables/iptables_1.4.21.bb @@ -28,6 +28,10 @@ FILES_${PN}-dbg =+ "${libdir}/xtables/.debug" SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ file://types.h-add-defines-that-are-required-for-if_packet.patch \ file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ + file://iptables.init \ + file://iptables-config \ + file://iptables.rules \ + file://ip6tables.rules \ " SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0" @@ -50,3 +54,18 @@ do_configure_prepend() { # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 } + +do_install_append() { + install -d -m 755 ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/iptables.init ${D}${sysconfdir}/init.d/iptables + install -m 755 ${WORKDIR}/iptables.init ${D}${sysconfdir}/init.d/ip6tables + sed -i -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' ${D}${sysconfdir}/init.d/ip6tables + + install -d -m 755 ${D}${sysconfdir}/sysconfig + install -m 755 ${WORKDIR}/iptables-config ${D}${sysconfdir}/sysconfig + install -m 755 ${WORKDIR}/iptables-config ${D}${sysconfdir}/sysconfig/ip6tables-config + sed -i -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' ${D}${sysconfdir}/sysconfig/ip6tables-config + + install -m 755 ${WORKDIR}/iptables.rules ${D}${sysconfdir}/sysconfig/iptables + install -m 755 ${WORKDIR}/ip6tables.rules ${D}${sysconfdir}/sysconfig/ip6tables +} -- 1.9.1 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
