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

12 views
Skip to first unread message

Adrian DC

unread,
Feb 20, 2026, 3:21:45 PMFeb 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

Stefano Babic

unread,
Mar 20, 2026, 9:50:14 AMMar 20
to Adrian DC, swup...@googlegroups.com, Stefano Babic
On 2/20/26 21:21, Adrian DC wrote:
> 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
>

Well, this is for the systemV init
recipes-support/swupdate/swupdate/swupdate, that just contains a "cd
/home/swupdate" that is useless, just taken over from a project of mine
(where some more things were done).

Just remove the useless cd from recipes-support/swupdate/swupdate/swupdate.

Best regards,
Stefano Babic


--
_______________________________________________________________________
Nabla Software Engineering GmbH
Hirschstr. 111A | 86156 Augsburg | Tel: +49 821 45592596
Geschäftsführer : Stefano Babic | HRB 40522 Augsburg
E-Mail: sba...@nabladev.com

Reply all
Reply to author
Forward
0 new messages