system-d zram service ignores /etc/conf.d/zram-init (config for openrc), instead, zram volume settings are hardcoded in /usr/lib/systemd/system/zram-*.service files. Those need to overrided everytime by the used. And with each zram-init reinstallation, those settings are lost. Either those settings need to be config-protected, or zram-*.service files need to tweaked to reuse /etc/conf.d/zram-init settings.
Created attachment 443434 [details] emerge --info
(In reply to Maciej Mrozowski from comment #0) > system-d zram service ignores /etc/conf.d/zram-init (config for openrc), > instead, zram volume settings are hardcoded in > /usr/lib/systemd/system/zram-*.service files. > Those need to overrided everytime by the used. > And with each zram-init reinstallation, those settings are lost. Arn't you supposed to replace the service file in /etc/systemd/system/? Systemd uses files in /etc to override /usr/ > or zram-*.service files > need to tweaked to reuse /etc/conf.d/zram-init settings. This is actually forbidden (by QA i think?) SystemD should not import openrc files at all.
(In reply to Jason Zaman from comment #2) > Aren't you supposed to replace the service file in /etc/systemd/system/? Either this, or one can just override the data one wants. For instance, one can put into /etc/lib/systemd/system/zram_swap.service.d/size512 a file with the content [Service] ExecStart= ExecStart=/usr/sbin/zram-init -s2 -alz4 512 (the empty ExecStart= is necessary to "clean" the original ExecStart command)
(In reply to Jason Zaman from comment #2) > Arn't you supposed to replace the service file in /etc/systemd/system/? > Systemd uses files in /etc to override /usr/ Indeed it seems so: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html#sect-Managing_Services_with_systemd-Unit_File_Modify Well, that's an easy bug to fix.