]> code.ossystems Code Review - openembedded-core.git/commitdiff
weston-init: Set $HOME variable for SysVinit manager
authorAdrian <adrian.fiergolski@fastree3d.com>
Mon, 15 Mar 2021 15:01:10 +0000 (16:01 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 20 Mar 2021 18:50:05 +0000 (18:50 +0000)
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.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/wayland/weston-init.bb
meta/recipes-graphics/wayland/weston-init/init

index 65d7b81dc54d986e4ac4188ae26ad1b73c4aa2d0..6b78e6722ff7118a78e91209e71410ebbfcaebd1 100644 (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
index d3e87c6cef6f4d8dd5da5d660752e1280bcc4533..a849f29bcbd85c6d30d2ef4e061ef332ea555450 100644 (file)
@@ -30,6 +30,7 @@ done
 case "$1" in
   start)
         . /etc/profile
+       export HOME=ROOTHOME
 
         weston-start -- $OPTARGS
   ;;