On Fri, Dec 11, 2015 at 10:29 AM, Alexander Kanavin <alexander.kana...@linux.intel.com> wrote: > On 12/11/2015 01:44 AM, Tom Hochstein wrote: > >> # There are multiple ways to start weston. >> if [ "$WAYLAND_DISPLAY" ]; then >> echo -e "\aError: Weston is already running." >> echo "This script does not support launching Weston nested." >> exit 1 >> else if [ "$DISPLAY" ]; then >> echo "Launching Weston with the x11 backend" >> openvt -s weston -- --log=/var/log/weston.log $OPTARGS >> else >> echo "Launching Weston with the DRM backend" >> export XDG_CONFIG_HOME=/etc >> openvt -v -- weston-launch -- --log=/var/log/weston.log >> $OPTARGS >> fi >> >> I still need to test this (and apply the design in systemd), but I wanted >> your feedback on the approach. > > > I think this looks okay, but you obviously need to test that all three > scenarios works as expected. Also, systemd unit file language may not > support this logic (it's not a full programming language), so the above > snippet probably needs to be separated into a wrapper script.
Agreed; the wrapper might make easier to integrate it on both, with less work. -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core