I have a few scripts placed in /etc/rc.d/functions.d that were launched during the boot process.
Now I moved to systemd but I have not found any documentation about how to implement those hooks in the new boot process. As far as I got I need to write customs .service files, but again I lack of infos about how..
Can anybody teach me a bit about this or link some documentation?
The systemd wiki page has an introduction to that topic, the man pages have a lot more info, and there are numerous official examples to use for guidance in /usr/lib/systemd/system.
You could also post your existing scripts here, in case people feel like suggesting specific solutions.
ok, after many searches I realized that
# man systemd.service
prints everything one needs to know about the entries of .service files.
For a quite big collection of examples one can also look here:
Ok, I think I need some help here.
I want to call the acpi_call kernel module to switch off the nvidia discrete card at boot. Usually I did that with
# echo '\_SB.PCI0.PEG1.GFX0._ON' > /proc/acpi/call
I wrote the following /etc/systemd/system/nvidia_off.service:
[Unit] Description=acpi_call to switch off nvidia discrete graphic [Service] Type=simple ExecStart=/bin/echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call ExecStop=/bin/echo '\_SB.PCI0.PEG1.GFX0._ON' > /proc/acpi/call [Install] WantedBy=multi-user.target
but testing with:
#systemctl start nvidia_off.service #systemctl stop nvidia_off.service
seems no effective. No output is produced but there is no effect on the power consumption which should be several watts lower.
I also take a look at sysctl but it seems to control only /proc/sys/anything while my module is under /proc/acpi
thanks in advance