Implement explicit selection of subsystem types.

- Fixes bugs #347583, #349389, both of which were triggered by cgroups
  being detected as the LXC subsystem type.
- Makes it much easier to select "prefix" type.
- "rc -S" will now print a warning if you have not configured rc_sys in
  /etc/rc.conf
- All other semantics of rc_sys are unchanged in this patch.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson
2011-01-05 22:03:43 -08:00
parent 6df531d33d
commit 09f990a7c8
13 changed files with 119 additions and 9 deletions

View File

@@ -7,3 +7,6 @@ MK= ../mk
include ${MK}/os.mk
include Makefile.${OS}
include ${MK}/scripts.mk
rc.conf: rc.conf.in rc.conf.${OS}
${SED} ${SED_REPLACE} ${SED_EXTRA} $^ > $@

View File

@@ -1,6 +1,2 @@
SED_EXTRA= -e 's:@TERM@:wsvt25:g'
SRCS+= rc.in rc.shutdown.in
rc.conf:
cp rc.conf.in rc.conf
cat rc.conf.Linux >> rc.conf
SRCS+= rc.conf.in rc.in rc.shutdown.in

8
etc/rc.conf.FreeBSD Normal file
View File

@@ -0,0 +1,8 @@
# This is the subsystem type. Valid options on FreeBSD:
# "" - nothing special
# "jail" - FreeBSD jails
# "prefix" - Prefix
# If unset, the old automagic detection code will be triggered. Said old code
# is deprecated and be removed not later than 2010/03/01.
rc_sys=""

View File

@@ -1,3 +1,15 @@
# This is the subsystem type. Valid options on Linux:
# "" - nothing special
# "lxc" - Linux Containers
# "openvz" - Linux OpenVZ
# "prefix" - Prefix
# "uml" - Usermode Linux
# "vserver" - Linux vserver
# "xen0" - Xen0 Domain
# "xenU" - XenU Domain
# If unset, the old automagic detection code will be triggered. Said old code
# is deprecated and be removed not later than 2010/03/01.
rc_sys=""
##############################################################################
# LINUX SPECIFIC OPTIONS

9
etc/rc.conf.NetBSD Normal file
View File

@@ -0,0 +1,9 @@
# This is the subsystem type. Valid options on NetBSD:
# "" - nothing special
# "prefix" - Prefix
# "xen0" - Xen0 Domain
# "xenU" - XenU Domain
# If unset, the old automagic detection code will be triggered. Said old code
# is deprecated and be removed not later than 2010/03/01.
rc_sys=""

View File

@@ -115,3 +115,4 @@
# You can also remove dependencies.
# This is mainly used for saying which servies do NOT provide net.
#rc_net_tap0_provide="!net"