From 09f990a7c835d75f67cfe696a35e8c46e67c612f Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 5 Jan 2011 22:03:43 -0800 Subject: 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 --- etc/Makefile | 3 +++ etc/Makefile.Linux | 6 +----- etc/rc.conf.FreeBSD | 8 ++++++++ etc/rc.conf.Linux | 12 ++++++++++++ etc/rc.conf.NetBSD | 9 +++++++++ etc/rc.conf.in | 1 + 6 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 etc/rc.conf.FreeBSD create mode 100644 etc/rc.conf.NetBSD (limited to 'etc') 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" + -- cgit v1.2.3