#!/sbin/openrc-run # Copyright 2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # OpenRC counterpart of the rr-zen_workaround.service system unit this package # installs. Installed unconditionally: a systemd user loses nothing by having it # on disk, and it is the only way to apply the workaround at boot on a host that # does not run systemd. Like the unit, it runs rr-zen_workaround.py once, which # sets the AMD Zen SpecLockMap MSR bit rr needs; "stop" undoes it with --reset. description="Apply the AMD Zen MSR workaround rr needs" start() { ebegin "Applying the rr AMD Zen workaround" /usr/bin/rr-zen_workaround.py eend $? } stop() { ebegin "Resetting the rr AMD Zen workaround" /usr/bin/rr-zen_workaround.py --reset eend $? }