diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-01-05 22:03:43 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2011-01-05 22:09:34 -0800 |
commit | 09f990a7c835d75f67cfe696a35e8c46e67c612f (patch) | |
tree | da69536cd225bad4028b01e88a0629bdca472dc1 /etc | |
parent | 6df531d33d0f3c3cad8edcafdcd62525ca30fc1f (diff) |
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/Makefile | 3 | ||||
-rw-r--r-- | etc/Makefile.Linux | 6 | ||||
-rw-r--r-- | etc/rc.conf.FreeBSD | 8 | ||||
-rw-r--r-- | etc/rc.conf.Linux | 12 | ||||
-rw-r--r-- | etc/rc.conf.NetBSD | 9 | ||||
-rw-r--r-- | etc/rc.conf.in | 1 |
6 files changed, 34 insertions, 5 deletions
diff --git a/etc/Makefile b/etc/Makefile index ee1642e8..24e54550 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 9ac0bc25..5b562947 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 00000000..5682e1db --- /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 e1f5ef5b..001e9c08 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 00000000..25d86a4c --- /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 200c4ce0..6aa36135 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" + |