Browse Source

Put user cache folder in RAM

pull/294/head
Xavier Petit 5 years ago
parent
commit
7625877dac
No known key found for this signature in database
GPG Key ID: CA3F2B17E25ABD26
  1. 1
      scripts/system/etc/gdm3/PostLogin/Default
  2. 2
      scripts/system/etc/gdm3/PostSession/Default

1
scripts/system/etc/gdm3/PostLogin/Default

@ -46,3 +46,4 @@ temp_path=/mnt/.01/tmp
mkdir -p "$user_path" "$temp_path"
chown -R "$USER":"$USER" "$user_path" "$temp_path"
mount -t overlay -o lowerdir="$HOME",upperdir="$user_path",workdir="$temp_path" overlay "$HOME"
mount -t tmpfs -o size=2G tmpfs "$HOME"/.cache

2
scripts/system/etc/gdm3/PostSession/Default

@ -21,6 +21,6 @@ systemctl stop user@1000.service
# Make sure the mountpoints are free
kill $(lsof -t "$HOME" /mnt) $(ps --no-headers -u "$USER" -o pid)
umount "$HOME" /mnt
umount "$HOME"/.cache "$HOME" /mnt
umount /dev/disk/by-partlabel/01-home ||:
wipefs -a /dev/disk/by-partlabel/01-tmp-home

Loading…
Cancel
Save