mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Fix using nvme drives for game storage
This commit is contained in:
@@ -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}."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user