@@ -15,13 +15,15 @@ do_install:append () {
install -d ${D}${datadir}/dbus-1/system.d
install -m 0644 ${S}/conf/mctpd-dbus.conf \
${D}${datadir}/dbus-1/system.d/mctpd.conf
+ install -d ${D}${nonarch_libdir}/sysusers.d
+ printf 'u! mctpd - "mctpd daemon" / /bin/false\n' > ${D}${nonarch_libdir}/sysusers.d/mctpd.conf
}
-FILES:${PN} += "${datadir}/dbus-1/system.d/mctpd.conf"
+FILES:${PN} += "${datadir}/dbus-1/system.d/mctpd.conf ${nonarch_libdir}/sysusers.d/mctpd.conf"
SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target"
USERADD_PACKAGES = "${PN}"
-USERADD_PARAM:${PN} = "-r -U -s /bin/false mctpd"
+USERADD_PARAM:${PN} = "-r -U -d / -s /bin/false mctpd"
DEPENDS += "systemd"
REQUIRED_DISTRO_FEATURES = "systemd"
The current recipe does not handle user creation when upgrading. Add mctpd user to sysusers.d to ensure it is created if needed. Current useradd params unintentionally set the home directory to /home/mctpd which does not exist and would conflict with the user definition in sysusers.d. Update useradd params to set the home directory to "/". Signed-off-by: James Lee <james@codeconstruct.com.au> --- meta-networking/recipes-support/mctp/mctpd_2.7.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)