fix(deck): Improve how /etc/default/steamos-btrfs is sourced

This commit is contained in:
Kyle Gospodnetich 2023-07-12 10:13:22 -07:00
parent 3a756bd24f
commit 438aec5303
4 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,25 @@
diff --git a/etc/systemd/system/steamos-automount@.service b/etc/systemd/system/steamos-automount@.service
index dd700da..152e231 100644
--- a/etc/systemd/system/steamos-automount@.service
+++ b/etc/systemd/system/steamos-automount@.service
@@ -14,6 +14,7 @@ Description=Mount removable drive %i and notify Steam
[Service]
Type=oneshot
RemainAfterExit=true
+EnvironmentFile=/etc/default/steamos-btrfs
ExecStart=/usr/sbin/steamos-automount add %i
ExecStop=/usr/sbin/steamos-automount remove %i
ExecReload=/usr/sbin/steamos-automount retrigger %i
diff --git a/usr/lib/hwsupport/format-device.sh b/usr/lib/hwsupport/format-device.sh
index 79afec7..43ea933 100755
--- a/usr/lib/hwsupport/format-device.sh
+++ b/usr/lib/hwsupport/format-device.sh
@@ -3,6 +3,8 @@
set -e
exec &> >(tee | logger -t steamos-format-device)
+source /etc/default/steamos-btrfs
+
RUN_VALIDATION=1
EXTENDED_OPTIONS="nodiscard"
# default owner for the new filesystem

View File

@ -12,6 +12,7 @@ Patch1: selinux.patch
Patch2: https://gitlab.com/popsulfr/steamos-btrfs/-/raw/main/files/usr/lib/hwsupport/steamos-automount.sh.patch
Patch3: https://gitlab.com/popsulfr/steamos-btrfs/-/raw/main/files/usr/lib/hwsupport/format-device.sh.patch
Patch4: user.patch
Patch5: bazzite-btrfs.patch
Requires: python3
Requires: python3-libevdev

View File

@ -34,4 +34,5 @@ STEAMOS_BTRFS_SDCARD_NTFS_MOUNT_OPTS="rw,noatime,lazytime,uid=1000,gid=1000,big_
STEAMOS_BTRFS_SDCARD_NTFS_FORMAT_OPTS="-f -F"
# Toggle to enable/disable the bind mount for Steam's compatdata/ folder on fat, exfat, ntfs filesystems.
# Setting it to 0 will make the eject functionality in the Steam client work again but proton games will not start on it.
# DO NOT ENABLE THE BELOW VARIABLE ON BAZZITE
STEAMOS_BTRFS_SDCARD_COMPATDATA_BIND_MOUNT="0"

View File

@ -1,3 +0,0 @@
if [[ -f /etc/default/steamos-btrfs ]]; then
source /etc/default/steamos-btrfs
fi