#!/bin/sh

if rc-update -a | grep -wq qemu-binfmt; then
	cat >&2 <<-EOF
		*
		* qemu-binfmt openrc service is deprecated, and will be removed in the future.
		* Switch to the replacement service binfmt:
		*     rc-update del qemu-binfmt && rc-update add binfmt
		*
		* NOTE: The binfmt service does not set 'CO' flags by default anymore. QEMU
		* does not safely handle the privileges they grant. To run setuid binaries
		* through qemu you need to ensure safety through other means and copy
		* /usr/lib/binfmt.d/qemu-*.conf to /etc/binfmt.d, edit to add 'C' to flags,
		* and restart binfmt.
		* See https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
		*
	EOF
fi

exit 0
