Fix using nvme drives for game storage

This commit is contained in:
rocknix
2025-08-18 17:42:00 +00:00
parent b094c4f05a
commit 4c81a2ce83
3 changed files with 6 additions and 7 deletions

View File

@@ -184,7 +184,7 @@ function mount_games() {
function find_games() {
if /usr/bin/busybox mountpoint -q /storage
then
for DEV in $(for dev in mmcblk[0-9] sd[a-z] nvme[0-9]; do blkid | grep ${dev} | awk 'BEGIN {FS=":"}; /ext4/ || /btrfs/ || /fat/ || /ntfs/ {print $1}' | sort -r; done)
for DEV in $(for dev in mmcblk[0-9] sd[a-z] nvme[0-9]n[0-9]; do blkid | grep ${dev} | awk 'BEGIN {FS=":"}; /ext4/ || /btrfs/ || /fat/ || /ntfs/ {print $1}' | sort -r; done)
do
ROOTDEV=$(echo ${DEV} | sed -e "s#^/.*/##g" -e "s#p[0-9].*\$##g")
log $0 "Inspecting ${DEV}."

View File

@@ -119,7 +119,7 @@ allowed_media_dirs = /media, /var/media, /run/media/$USER
# allowed_devices = /dev/*
# WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS
# SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm
allowed_devices = /dev/*
allowed_devices = /dev/*, /dev/nvme*
# allowed_internal_devices causes udevil to treat any listed block devices as

View File

@@ -2,15 +2,15 @@
IMPORT{cmdline}="installer"
ENV{installer}=="1", GOTO="exit"
# check for blockdevices, /dev/sd*, /dev/sr* and /dev/nvme*
SUBSYSTEM!="block", KERNEL!="sd*|sr*|nvme*", GOTO="exit"
# check for blockdevices, /dev/sd*, /dev/sr*
SUBSYSTEM!="block", KERNEL!="sd*|sr*", GOTO="exit"
# check for special partitions we dont want mount
IMPORT{builtin}="blkid"
ENV{ID_FS_LABEL}=="EFI|BOOT|Recovery|RECOVERY|SETTINGS|boot|root0|share0", GOTO="exit"
# /dev/sd* and /dev/nvme* with partitions/disk and filesystems only, and /dev/sr* disks only
KERNEL=="sd*|nvme*", ENV{DEVTYPE}=="partition|disk", ENV{ID_FS_USAGE}=="filesystem", GOTO="harddisk"
# /dev/sd* with partitions/disk and filesystems only and /dev/sr* disks only
KERNEL=="sd*", ENV{DEVTYPE}=="partition|disk", ENV{ID_FS_USAGE}=="filesystem", GOTO="harddisk"
KERNEL=="sr*", ENV{DEVTYPE}=="disk", GOTO="optical"
GOTO="exit"
@@ -27,4 +27,3 @@ GOTO="exit"
# Exit
LABEL="exit"