Merge pull request #519 from fewtarius/dev

Dev
This commit is contained in:
fewtarius 2022-09-17 09:45:17 -04:00 committed by GitHub
commit 6f4baf5cda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 45 deletions

View file

@ -41,7 +41,6 @@ then
done
fi
clear >/dev/console
/usr/bin/show_splash intro 2>&1 >>${BOOTLOG}
DEVICE_CPU_GOVERNOR=$(get_setting system.cpugovernor)

View file

@ -6,6 +6,7 @@
. /etc/os-release
UPDATE_ROOT="/storage/.update"
MOUNT_GAMES=$(get_setting system.mountgames)
GAMES_DEVICE=$(get_setting system.gamesdevice)
mount_games() {
@ -16,24 +17,6 @@ mount_games() {
fi
}
mount_update() {
if [ -d "${UPDATE_ROOT}" ] && [ ! -e "/storage/.please_resize_me" ]
then
/usr/bin/busybox rm -rf "${UPDATE_ROOT}" >/dev/null 2>&1
/usr/bin/busybox mkdir -p "${UPDATE_ROOT}" >/dev/null 2>&1
fi
if [ ! -d "/storage/roms/update" ]
then
/usr/bin/busybox mkdir -p /storage/roms/update >/dev/null 2>&1
fi
if [ ! -e "/storage/.please_resize_me" ]
then
/usr/bin/busybox mkdir -p "${UPDATE_ROOT}" >/dev/null 2>&1
mount --bind "${UPDATE_ROOT}" /storage/roms/update >/dev/null 2>&1
fi
}
find_games() {
if /usr/bin/busybox mountpoint -q /storage ; then
if [ ! -d "/storage/roms" ]
@ -66,11 +49,16 @@ find_games() {
fi
}
if [ "${MOUNT_GAMES}" = "0" ]
then
exit 0
fi
if [ -e "${GAMES_DEVICE}" ]
then
mount_games ${GAMES_DEVICE}
else
find_games
fi
mount_update
set_setting system.gamesdevice ${GAMES_DEVICE}

View file

@ -8,8 +8,6 @@ if [ "$(cat /storage/.config/boot.hint 2>/dev/null)" = "UPDATE" ] || [ ! -e "/st
then
if [ -e "/usr/share/post-update" ]
then
show_splash intro
echo -ne "\033[1000H\033[2K==> Preparing system.." >/dev/console
/usr/share/post-update
fi
rm /storage/.config/boot.hint

View file

@ -52,8 +52,6 @@ check_space() {
fi
}
clear
ONLINE_STATUS=$(check_network)
if [ ! "${ONLINE_STATUS}" == true ]
then

View file

@ -50,7 +50,7 @@
# writeable shares of disks and paths under /storage
[update]
path = /storage/roms/update
path = /storage/.update
available = yes
browseable = yes
writeable = yes

View file

@ -752,18 +752,6 @@ check_out_of_space() {
do_cleanup() {
StartProgress spinner "Cleaning up... "
if mountpoint -q /storage/roms; then
umount /storage/roms &>/dev/null
fi
if mountpoint -q /storage; then
umount /storage &>/dev/null
fi
if mountpoint -q /update; then
umount /update &>/dev/null
fi
if [ -d $UPDATE_ROOT/.tmp/mnt ]; then
if mountpoint -q $UPDATE_ROOT/.tmp/mnt ; then
# busybox umount deletes loop device automatically
@ -777,10 +765,16 @@ do_cleanup() {
[ -f "$UPDATE_IMG_GZ" ] && rm -f "$UPDATE_IMG_GZ" &>/dev/null
[ -f "$UPDATE_IMG" ] && rm -f "$UPDATE_IMG" &>/dev/null
rm -rf $UPDATE_ROOT/[0-9a-zA-Z]* &>/dev/null
rm -f $UPDATE_ROOT/* &>/dev/null
rm -f $UPDATE_ROOT/.nocheck $UPDATE_ROOT/.nocompat &>/dev/null
rm -rf $UPDATE_ROOT/.tmp &>/dev/null
rm -rf $UPDATE_ROOT/.[0-9a-zA-Z]* &>/dev/null
rm -rf $UPDATE_ROOT/* &>/dev/null
if mountpoint -q /storage; then
umount /storage &>/dev/null
fi
if mountpoint -q /update; then
umount /update &>/dev/null
fi
sync
@ -1069,8 +1063,6 @@ prepare_sysroot() {
if [ ! -f "/sysroot/storage/.configured" ]
then
echo -ne "\033[1000H\033[2K==> Initializing system, please wait.." >/dev/console
else
echo -ne "\033[1000H\033[2K==> Loading, please wait.." >/dev/console
fi
}
@ -1319,8 +1311,6 @@ else
rm -f /sysroot/storage/init.log
fi
clear >/dev/console
# switch to new sysroot and start real init
exec /usr/bin/busybox switch_root /sysroot /usr/lib/systemd/systemd $INIT_ARGS $INIT_UNIT