2023-08-07 00:30:11 +00:00
|
|
|
#!/bin/sh
|
2022-08-31 23:24:15 +00:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Copyright (C) 2022-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
|
2023-08-07 00:30:11 +00:00
|
|
|
# Minimal OS variable loading for performance
|
|
|
|
. /etc/profile.d/02-distribution
|
2022-08-31 23:24:15 +00:00
|
|
|
|
2023-07-22 23:56:23 +00:00
|
|
|
tocon "Configuring user interface..."
|
2023-04-22 20:01:07 +00:00
|
|
|
|
2022-08-31 23:24:15 +00:00
|
|
|
UIMODE=$(get_setting desktop.enabled)
|
2023-04-21 21:40:02 +00:00
|
|
|
if [ "${UIMODE}" = "1" ] || \
|
|
|
|
[ ! -e "/usr/bin/emulationstation" ]
|
2022-08-31 23:24:15 +00:00
|
|
|
then
|
|
|
|
cp -f /usr/share/weston/weston.ini /storage/.config/weston.ini
|
|
|
|
else
|
|
|
|
cp -f /usr/share/weston/kiosk.ini /storage/.config/weston.ini
|
|
|
|
fi
|
2022-10-27 11:51:00 +00:00
|
|
|
|
|
|
|
STARTUP=$(get_setting weston.startup)
|
2023-04-21 21:40:02 +00:00
|
|
|
if [ -z "${STARTUP}" ] && \
|
|
|
|
[ -e "/usr/bin/emulationstation" ]
|
2022-10-27 11:51:00 +00:00
|
|
|
then
|
|
|
|
STARTUP="/usr/bin/start_es.sh"
|
|
|
|
set_setting weston.startup "${STARTUP}"
|
|
|
|
fi
|
|
|
|
sed -i "s#@STARTUP@#${STARTUP}#g" /storage/.config/weston.ini
|