2023-07-12 17:13:22 +00:00
|
|
|
diff --git a/usr/lib/hwsupport/format-device.sh b/usr/lib/hwsupport/format-device.sh
|
2024-04-18 23:02:36 +00:00
|
|
|
index 58d66d3..768a6fc 100755
|
2023-07-12 17:13:22 +00:00
|
|
|
--- a/usr/lib/hwsupport/format-device.sh
|
|
|
|
+++ b/usr/lib/hwsupport/format-device.sh
|
2024-04-18 23:02:36 +00:00
|
|
|
@@ -2,7 +2,9 @@
|
2023-08-10 23:24:06 +00:00
|
|
|
|
2023-07-12 17:13:22 +00:00
|
|
|
set -e
|
|
|
|
|
2024-04-18 23:02:36 +00:00
|
|
|
-. /usr/libexec/hwsupport/common-functions
|
2023-07-12 17:13:22 +00:00
|
|
|
+source /etc/default/steamos-btrfs
|
|
|
|
+
|
2024-04-18 23:02:36 +00:00
|
|
|
+. /usr/libexec/common-functions
|
|
|
|
|
2023-08-10 23:24:06 +00:00
|
|
|
# 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.
|
2023-11-23 18:53:24 +00:00
|
|
|
diff --git a/usr/lib/hwsupport/steamos-automount.sh b/usr/lib/hwsupport/steamos-automount.sh
|
2024-04-18 23:02:36 +00:00
|
|
|
index 366bef3..f627175 100755
|
2023-11-08 17:53:39 +00:00
|
|
|
--- a/usr/lib/hwsupport/steamos-automount.sh
|
|
|
|
+++ b/usr/lib/hwsupport/steamos-automount.sh
|
2024-04-18 23:02:36 +00:00
|
|
|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
+source /etc/default/steamos-btrfs
|
|
|
|
+
|
|
|
|
. /usr/libexec/hwsupport/common-functions
|
|
|
|
|
|
|
|
# Originally from https://serverfault.com/a/767079
|
|
|
|
@@ -60,6 +62,7 @@ do_mount()
|
2023-11-08 17:53:39 +00:00
|
|
|
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
|
2024-04-18 23:02:36 +00:00
|
|
|
@@ -103,6 +106,7 @@ do_mount()
|
2023-11-08 17:53:39 +00:00
|
|
|
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
|
2024-04-18 23:02:36 +00:00
|
|
|
@@ -115,7 +119,7 @@ do_mount()
|
2023-11-08 17:53:39 +00:00
|
|
|
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 ####
|
|
|
|
|