Bugfix: automount

This commit is contained in:
fewtarius 2022-09-25 18:22:32 -04:00
parent 495ede36e7
commit 71ea5d485e
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
3 changed files with 5 additions and 8 deletions

View file

@ -9,7 +9,7 @@ UPDATE_ROOT="/storage/.update"
MOUNT_GAMES=$(get_setting system.automount)
GAMES_DEVICE=$(get_setting system.gamesdevice)
if [[ "${MOUNTGAMES}" != [0-9] ]]
if [[ ! "${MOUNT_GAMES}" =~ [0-9] ]]
then
set_setting system.automount 1
elif [[ "${MOUNT_GAMES}" == "0" ]]
@ -18,10 +18,10 @@ then
fi
mount_games() {
NULL=$(grep ${1} /proc/mounts >/dev/null 2>&1)
NULL=$(cat /proc/mounts | grep -v -e "/var/media" >/dev/null 2>&1 | grep ${1})
if [ ! "$?" = "0" ] && [ -e "${1}" ] && [ ! -e "/storage/.please_resize_me" ]
then
mount -o umask=000 ${1} /storage/roms >/dev/null 2>&1
mount ${1} /storage/roms >/dev/null 2>&1
fi
}
@ -46,7 +46,8 @@ find_games() {
# Assume this is an android boot device and ignore it.
continue
fi
NULL=$(grep ${DEV} /proc/mounts >/dev/null 2>&1)
# Udevil might mount it, and we shouldn't care if it does.
NULL=$(cat /proc/mounts | grep -v -e "/var/media" >/dev/null 2>&1 | grep ${DEV})
if [ ! "$?" = "0" ] && [ -e "${DEV}" ] && [ ! -e "/storage/.please_resize_me" ]
then
GAMES_DEVICE=${DEV}

View file

@ -28,6 +28,3 @@ post_makeinstall_target() {
cp -PR src/udevil $INSTALL/usr/bin
}
post_install() {
enable_service udevil-mount@.service
}

View file

@ -1,6 +1,5 @@
[Unit]
Description=Udevil mount service
After=jelos-autostart.service
[Service]
Type=oneshot