Merge pull request #2669 from fewtarius/dev

Bug fixes and refinements.
This commit is contained in:
fewtarius 2024-01-12 07:23:03 -05:00 committed by GitHub
commit c6200179d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 8 deletions

View file

@ -3,11 +3,7 @@
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
PICO_DIR="/storage/roms/pico-8"
if [ ! -d "${PICO_DIR}" ]
if [ -d "${PICO_DIR}" ]
then
mkdir "${PICO_DIR}"
touch "${PICO_DIR}/Splore.png"
fi
# Suggest removing this and replacing it with a file called Splore.png
# cp -f "/usr/bin/start_pico8.sh" "${PICO_DIR}/Start Pico-8.sh"
touch "${PICO_DIR}/Splore.png"

View file

@ -16,6 +16,12 @@ function unmount() {
umount -f "${1}" 2>/dev/null ||:
}
function add_readme() {
cat <<EOF >/storage/roms/README
Use the \`Create Game Directories\` option in \`System Settings\` to create your game directories.
EOF
}
function start_ms() {
### Entrypoint will be either games card found (external), or not found (internal).
MOUNT_PATH="/storage/games-${1}"
@ -75,6 +81,7 @@ then
elif [[ "${MOUNT_GAMES}" == "0" ]]
then
start_ms internal
add_readme
exit 0
fi
@ -134,6 +141,7 @@ function mount_games() {
/usr/bin/busybox mount ${1} ${MOUNT_PATH} >/dev/null 2>&1
fi
start_ms external
add_readme
exit 0
}
@ -178,6 +186,7 @@ function find_games() {
set_setting system.merged.device internal
fi
start_ms internal
add_readme
exit 0
fi
}

View file

@ -22,7 +22,7 @@ case "${1}" in
systemctl reboot
;;
"ALL")
systemctl stop ${UI_SERVICE}
swapoff -a
cd /
find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' -a ! -regex '^/storage/games-*' \) -delete
mkdir /storage/.config/

View file

@ -40,6 +40,7 @@ then
done
fi
mkdir -p /storage/.config/modprobe.d >/dev/null 2>&1
touch /storage/.configured >/dev/null 2>&1
fi

View file

@ -1,7 +1,7 @@
[Unit]
Description=Setup User config dir
DefaultDependencies=no
After=systemd-tmpfiles-setup.service
After=systemd-tmpfiles-setup.service jelos-automount.service
[Service]
Type=oneshot