F45 Beta: set some setting/run commands at/after boot

I used to set some powertop setting via handcrufted rc.local under F44.

now with F45 systemd lost the ability to pick up rc.local via “sudo systemd enable rc-local”.

idea’s to get the powertop setting set during/after boot ?

it’s mostly writing to /proc/sys/, like:

 echo '0' > '/proc/sys/kernel/nmi_watchdog';

but also executing comands, like:

/usr/sbin/ethtool -s enp3s0 wol d;

For those, a file in /etc/sysctl.d is the usual way to set theese settings.

For example create a file /etc/sysctl/kernel.conf with this content

kernel.nmi_watchdog = 0

would set /proc/sys/kernel/nmi_watchdog to 0.

Run man sysctl.conf for more information. Or look at the system provided files in /usr/lib/sysctl.d.

For other commands, you could create your own systemd unit to run the script, for example by copying the rc-local.service unit from the old system.

For setting the Wake-on-Lan you can crate a .link file in /etc/systemd/network. See `man systemd.link.
Example

[MATCH]
Name=enp3s0

[LINK]
WakeOnLan=off

Thanks for input.

I managed it via an systemd service file