1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-05-04 07:27:08 +01:00

Make swap size configurable (#3882)

Allow configuration of the swap size via /etc/default/haos-swapfile file. By
setting the SWAPSIZE variable in this file, swapfile get recreated on the next
reboot to the defined size. Size can be either in bytes or with optional units
(B/K/M/G, accepting some variations but always interpreted as power of 10). The
size is then rounded to 4k block size. If no override is defined or the value
can't be parsed, it falls back to previously used 33% of system RAM.

Fixes #968
This commit is contained in:
Jan Čermák
2025-02-19 15:33:04 +01:00
committed by GitHub
parent dc7b693691
commit d42e34f646
6 changed files with 89 additions and 15 deletions

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Persistent /etc/default directory
Requires=mnt-overlay.mount
After=mnt-overlay.mount
[Mount]
What=/mnt/overlay/etc/default
Where=/etc/default
Type=None
Options=bind
[Install]
WantedBy=hassos-bind.target