builder: build: filesystem.py: allow add or remove files to /var

Signed-off-by: BigfootACA <bigfoot@classfun.cn>
This commit is contained in:
BigfootACA 2024-05-31 16:58:09 +08:00
parent 37aed6dfee
commit 1e9877ff7e

View File

@ -75,8 +75,9 @@ def check_allowed(path: str, action: str):
Why these folder is writable
1. /etc/ is used for administrator configs
2. /boot/ is used for system boot up, you can put bootloaders configs into this folder
3. /var/ is used for daemons runtime states
"""
if not path.startswith(("/etc/", "/boot/")):
if not path.startswith(("/etc/", "/boot/", "/var/")):
raise ArchBuilderConfigError(f"{action} {path} is not allowed")