Bugfix: automount
This commit is contained in:
parent
495ede36e7
commit
71ea5d485e
3 changed files with 5 additions and 8 deletions
|
@ -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}
|
||||
|
|
|
@ -28,6 +28,3 @@ post_makeinstall_target() {
|
|||
cp -PR src/udevil $INSTALL/usr/bin
|
||||
}
|
||||
|
||||
post_install() {
|
||||
enable_service udevil-mount@.service
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[Unit]
|
||||
Description=Udevil mount service
|
||||
After=jelos-autostart.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
Loading…
Reference in a new issue