Hi folks,

This is a summary of how to detect Baselayout-2/OpenRC from within
init.d scripts. We raised it in January, without any actual final
agreement:
http://archives.gentoo.org/gentoo-dev/msg_5959bcfaf3ba566c551823039643f5c5.xml

Also, there were some items that weren't raised in the previous
discussion:
- The Vserver team needs the actual version of OpenRC, AND it must be
  available without any exec()/fork()/clone() calls.
- init.d/sysfs might be removed on some embedded systems.

The final solution that everybody agreed on is as follows.
1. OpenRC will provide /libexec/rc/version, a text file containing the
   version (possible including a git ID) of the release.
2. Right now, every init.d script that needs to detection should revbump
   and change to the following:
   [[ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /libexec/rc/version ]]
   This allows a safe migration.
3. Approximately 6 months after OpenRC and Baselayout2 go stable, the
   detection will drop to:
   [[ -f /libexec/rc/version ]]
4. For vserver and anybody else that needs the version details of
   OpenRC, you get to read the file, and RDEPEND on the minimal package
   version you want.

GDP team:
(I didn't hear from you in the bug)
Could you please update:
- handbook section "Writing Init scripts"
- OpenRC migration guide

-- 
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

Attachment: pgpz97nQpJ7F9.pgp
Description: PGP signature

Reply via email to