summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2011-01-05 22:03:43 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2011-01-05 22:09:34 -0800
commit09f990a7c835d75f67cfe696a35e8c46e67c612f (patch)
treeda69536cd225bad4028b01e88a0629bdca472dc1 /etc
parent6df531d33d0f3c3cad8edcafdcd62525ca30fc1f (diff)
downloadopenrc-09f990a7c835d75f67cfe696a35e8c46e67c612f.tar.gz
openrc-09f990a7c835d75f67cfe696a35e8c46e67c612f.tar.bz2
openrc-09f990a7c835d75f67cfe696a35e8c46e67c612f.tar.xz
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>
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile3
-rw-r--r--etc/Makefile.Linux6
-rw-r--r--etc/rc.conf.FreeBSD8
-rw-r--r--etc/rc.conf.Linux12
-rw-r--r--etc/rc.conf.NetBSD9
-rw-r--r--etc/rc.conf.in1
6 files changed, 34 insertions, 5 deletions
diff --git a/etc/Makefile b/etc/Makefile
index ee1642e..24e5455 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -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} $^ > $@
diff --git a/etc/Makefile.Linux b/etc/Makefile.Linux
index 9ac0bc2..5b56294 100644
--- a/etc/Makefile.Linux
+++ b/etc/Makefile.Linux
@@ -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
diff --git a/etc/rc.conf.FreeBSD b/etc/rc.conf.FreeBSD
new file mode 100644
index 0000000..5682e1d
--- /dev/null
+++ b/etc/rc.conf.FreeBSD
@@ -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=""
+
diff --git a/etc/rc.conf.Linux b/etc/rc.conf.Linux
index e1f5ef5..001e9c0 100644
--- a/etc/rc.conf.Linux
+++ b/etc/rc.conf.Linux
@@ -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
diff --git a/etc/rc.conf.NetBSD b/etc/rc.conf.NetBSD
new file mode 100644
index 0000000..25d86a4
--- /dev/null
+++ b/etc/rc.conf.NetBSD
@@ -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=""
+
diff --git a/etc/rc.conf.in b/etc/rc.conf.in
index 200c4ce..6aa3613 100644
--- a/etc/rc.conf.in
+++ b/etc/rc.conf.in
@@ -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"
+