On Sun, Jun 07, 2009 at 01:45:15PM -0700, Josh Saddler wrote: > Then, my fellow developers, ya'll need to tell us exactly what needs to > change. That has not yet happened on the bugs, just a lot of offtopic > discussion relevant to the package maintainers, but not to the GDP for > documentation purposes. Just because there's lots of chatter on e.g. > http://bugs.gentoo.org/show_bug.cgi?id=270646 doesn't mean that the GDP > has any idea of how to proceed. The final decision was pretty clear I thought, but I've written out the text of what you need to add, so that you can add it ASAP to the documentation.
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: ============= <h1>Converting init.d scripts</h1> <note> This section is intended primarily for developers, but is also relevant to anybody with custom init.d scripts. </note> <h2>Detecting OpenRC</h2> <p> 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: </p> <code description="OpenRC detection test, transitional"> [[ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /libexec/rc/version ]] </code> <code description="Example usage"> 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/... } </code> <p> After $DATE [1], the official detection test will be: </p> <code description="OpenRC detection test, final"> [[ -f /libexec/rc/version ]] </code> <h2>Detecting the OpenRC version</h2> <p> If you need to know the exact version of OpenRC, you should RDEPEND on the minimum version, and then read the file as follows: </p> <code description="OpenRC version query"> read version </libexec/rc/version </code> ============= I've just put $DATE in here since we don't know when yet. -- Robin Hugh Johnson Gentoo Linux Developer & Infra Guy E-Mail : robb...@gentoo.org GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
pgpjp0QbsBhMN.pgp
Description: PGP signature