summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2022-02-01 16:11:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-03 09:01:58 +0000
commit8fe5cff505f4fd942723d6f1526b0461747fc44d (patch)
tree47f38760cd9ec469f6b63eb1d2ef028f479f3bb1 /meta/recipes-connectivity
parent14ac72ead9c581c5fac224a9b330b62d5faa048a (diff)
downloadopenembedded-core-contrib-8fe5cff505f4fd942723d6f1526b0461747fc44d.tar.gz
dhcpcd: add option to set DBDIR location
This will allow to use the different DBDIR location, because the /var/lib could be used as a read-only location. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
index 4007a4bd2d..ab6ffe986c 100644
--- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
+++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
@@ -32,8 +32,11 @@ PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp"
PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony"
PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt"
+# add option to override DBDIR location
+DBDIR ?= "${localstatedir}/lib/${BPN}"
+
EXTRA_OECONF = "--enable-ipv4 \
- --dbdir=${localstatedir}/lib/${BPN} \
+ --dbdir=${DBDIR} \
--sbindir=${base_sbindir} \
--runstatedir=/run \
--enable-privsep \
@@ -43,15 +46,15 @@ EXTRA_OECONF = "--enable-ipv4 \
"
USERADD_PACKAGES = "${PN}"
-USERADD_PARAM:${PN} = "--system -d ${localstatedir}/lib/${BPN} -M -s /bin/false -U dhcpcd"
+USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd"
do_install:append () {
# install systemd unit files
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir}
- chmod 700 ${D}${localstatedir}/lib/${BPN}
- chown dhcpcd:dhcpcd ${D}${localstatedir}/lib/${BPN}
+ chmod 700 ${D}${DBDIR}
+ chown dhcpcd:dhcpcd ${D}${DBDIR}
}
FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"