In handbook section "4.d. Writing Init Scripts", please add a link to the OpenRC migration document. Alternatively, add everything below to the 4.d block, and a link BACK from the OpenRC migration document to the portion of the handbook. The following goes into openrc-migration.xml: Add a new toplevel L1 block, after the 'Finishing Up' L2 block: =============

Converting init.d scripts

This section is intended primarily for developers, but is also relevant to anybody with custom init.d scripts.

Detecting OpenRC

If your init.d script needs to detect being run under OpenRC specifically to perform different actions, you are strongly encourage to use the following as the means of detecting OpenRC:

[[ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /libexec/rc/version ]] depend() { if [[ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /libexec/rc/version ]]; then need sysfs fi } start() { echo foobar >/sys/... }

After $DATE [1], the official detection test will be:

[[ -f /libexec/rc/version ]]

Detecting the OpenRC version

If you need to know the exact version of OpenRC, you should RDEPEND on the minimum version, and then read the file as follows:

read version ============= I've just put $DATE in here since we don't know when yet.