Closed uni-dos closed 1 year ago
Thanks for the report. This happens because dinit does not pass the environment correctly, thus zramd is not able to locate other executables on the system. To solve it the service file needs to declare the PATH variable for example:
# /etc/dinit.d/zramd
type = scripted
command = /usr/bin/env PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin /usr/bin/zramd start
stop-command = /usr/bin/env PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin /usr/bin/zramd stop
restart = false
logfile = /var/log/dinit/zramd.log
depends-on = root-rw
Remember that dinit sometimes does not recognize changes to the unit files until you restart the system, so after you restart you can test the new service
sudo dinitctl start zramd
sudo dinitctl enable zramd
Interesting. I installed zramd through the aur and created the init script myself. I'll give it a try.
I am attempting to use zramd on Artix Linux with dinit as the unit system and I cannot start zramd. I get
error: failed to execute "modprobe zram num_devices=1"
Does zramd need a program to start before it to work?