[PATCH] swupdate.inc: use 'ROOT_HOME' path if not using '/home/root'

4 views
Skip to first unread message

Adrian DC

unread,
Feb 20, 2026, 3:21:45 PM (2 days ago) Feb 20
to swup...@googlegroups.com, Stefano Babic, Adrian DC
Hardcoded '/home/root' path may be different on build systems
using '/root' for example, hence breaking service work directory
---

Signed-off-by: Adrian DC <radi...@gmail.com>
---
recipes-support/swupdate/swupdate.inc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
index cb39134..788e488 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -289,6 +289,9 @@ do_install () {
install -d ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d
sed -i -e "s|/usr/lib/|${libdir}/|" ${D}${sysconfdir}/init.d/swupdate
+ if [ "${ROOT_HOME}" != "/home/root" ]; then
+ sed -i -e "s|/home/root|${ROOT_HOME}|g" ${D}${sysconfdir}/init.d/swupdate
+ fi

# shell based configuration loader allows to place code snippets into this folder
install -d ${D}${libdir}/swupdate/conf.d
--
2.43.0

Reply all
Reply to author
Forward
0 new messages