f4dee87da3bb818c36059161c264af9aa55cd390
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-extended / iptables / iptables_%.bbappend
1 SRCREV_FORMAT = "opendev"
2 SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
3 SUBPATH0 = "iptables-config"
4 DSTSUFX0 = "stx-configfiles"
5
6 LICENSE_append = "& Apache-2.0"
7 LIC_FILES_CHKSUM += "\
8         file://stx-configfiles-LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
9         "
10
11 SRC_URI += " \
12         git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
13 "
14
15 do_unpack_append() {
16     bb.build.exec_func('do_copy_config_files', d)
17 }
18
19 do_copy_config_files () {
20     cp -pf ${WORKDIR}/${DSTSUFX0}/files/LICENSE ${S}/stx-configfiles-LICENSE
21 }
22
23 inherit systemd
24 SYSTEMD_PACKAGES += "${PN}"
25 SYSETMD_SERVICE_${PN}_append = "iptables.service ip6tables.service"
26 SYSTEMD_AUTO_ENABLE_${PN} = "enable"
27 DISTRO_FEATURES_BACKFILL_CONSIDERED_remove = "sysvinit"
28
29 do_install_append() {
30     install -d -m0755 ${D}/${sysconfdir}/sysconfig
31     install -m 600 ${WORKDIR}/${DSTSUFX0}/files/iptables.rules ${D}/${sysconfdir}/sysconfig/iptables
32     install -m 600 ${WORKDIR}/${DSTSUFX0}/files/ip6tables.rules ${D}/${sysconfdir}/sysconfig/ip6tables
33 }