weston-init: Set $HOME variable for SysVinit manager

SysVinit sets by default the $HOME directory to "/" for the init scripts.
It's picked then by the weston-launcher and make weston-terminal to have
wrongly set $HOME environment variable for the root user.

(From OE-Core rev: f5ddf5533b19a41be9e9cd403c2e7ded6da6f272)

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Adrian
2021-03-15 16:01:10 +01:00
committed by Richard Purdie
parent 7b9601d49c
commit 991a49fb99
2 changed files with 2 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ DEFAULTBACKEND_x86-x32 = "fbdev"
do_install() {
if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston
fi
install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston

View File

@@ -30,6 +30,7 @@ done
case "$1" in
start)
. /etc/profile
export HOME=ROOTHOME
weston-start -- $OPTARGS
;;