mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-01 03:21:41 +00:00
54 lines
2.6 KiB
Diff
54 lines
2.6 KiB
Diff
diff --git a/etc/systemd/system/steamos-automount@.service b/etc/systemd/system/steamos-automount@.service
|
|
index 96e8818..33038bc 100644
|
|
--- a/etc/systemd/system/steamos-automount@.service
|
|
+++ b/etc/systemd/system/steamos-automount@.service
|
|
@@ -14,5 +14,6 @@ Description=Mount removable drive %i
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
+EnvironmentFile=/etc/default/steamos-btrfs
|
|
ExecStart=-/usr/libexec/steamos-automount add %i
|
|
ExecStop=-/usr/libexec/steamos-automount remove %i
|
|
diff --git a/usr/lib/hwsupport/format-device.sh b/usr/lib/hwsupport/format-device.sh
|
|
index 566eea2..d6803ff 100755
|
|
--- a/usr/lib/hwsupport/format-device.sh
|
|
+++ b/usr/lib/hwsupport/format-device.sh
|
|
@@ -2,6 +2,8 @@
|
|
|
|
set -e
|
|
|
|
+source /etc/default/steamos-btrfs
|
|
+
|
|
# If the script is not run from a tty then send a copy of stdout and
|
|
# stderr to the journal. In this case stderr is also redirected to stdout.
|
|
if ! tty -s; then
|
|
diff --git a/usr/lib/hwsupport/steamos-automount.sh b/usr/lib/hwsupport/steamos-automount.sh
|
|
index 6dd3a2f..ca1c5ca 100755
|
|
--- a/usr/lib/hwsupport/steamos-automount.sh
|
|
+++ b/usr/lib/hwsupport/steamos-automount.sh
|
|
@@ -66,6 +66,7 @@ do_mount()
|
|
dev_json=$(lsblk -o PATH,LABEL,FSTYPE --json -- "$DEVICE" | jq '.blockdevices[0]')
|
|
ID_FS_LABEL=$(jq -r '.label | select(type == "string")' <<< "$dev_json")
|
|
ID_FS_TYPE=$(jq -r '.fstype | select(type == "string")' <<< "$dev_json")
|
|
+ FSTYPE_PREFIX=""
|
|
|
|
#### SteamOS Btrfs Begin ####
|
|
if [[ -f /etc/default/steamos-btrfs ]]; then
|
|
@@ -109,6 +110,7 @@ do_mount()
|
|
UDISKS2_ALLOW='uid=$UID,gid=$GID,umask,dmask,fmask,locale,norecover,ignore_case,windows_names,compression,nocompression,big_writes,nls,nohidden,sys_immutable,sparse,showmeta,prealloc'
|
|
OPTS="${STEAMOS_BTRFS_SDCARD_NTFS_MOUNT_OPTS:-rw,noatime,lazytime,uid=1000,gid=1000,big_writes,umask=0022,ignore_case,windows_names}"
|
|
FSTYPE="lowntfs-3g"
|
|
+ FSTYPE_PREFIX="ntfs:"
|
|
if [[ ! -f /etc/filesystems ]] || ! grep -q '\b'"${FSTYPE}"'\b' /etc/filesystems; then
|
|
echo "${FSTYPE}" >> /etc/filesystems
|
|
fi
|
|
@@ -121,7 +123,7 @@ do_mount()
|
|
if [[ -f "${udisks2_mount_options_conf}" && ! -f "${udisks2_mount_options_conf}.orig" ]]; then
|
|
mv -f "${udisks2_mount_options_conf}"{,.orig}
|
|
fi
|
|
- echo -e "[defaults]\n${FSTYPE}_allow=${UDISKS2_ALLOW},${OPTS}" > "${udisks2_mount_options_conf}"
|
|
+ echo -e "[defaults]\n${FSTYPE_PREFIX}${FSTYPE}_allow=${UDISKS2_ALLOW},${OPTS}" > "${udisks2_mount_options_conf}"
|
|
trap 'rm -f "${udisks2_mount_options_conf}" ; [[ -f "${udisks2_mount_options_conf}.orig" ]] && mv -f "${udisks2_mount_options_conf}"{.orig,}' EXIT
|
|
#### SteamOS Btrfs End ####
|
|
|