diff options
author | William Hubbs <williamh@gentoo.org> | 2011-03-04 19:08:08 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2011-03-05 00:04:06 -0600 |
commit | 3fca6bd0278bc2a21fdd72c3bf20220e81b2eab5 (patch) | |
tree | 875b63c5d1c7500e8f3ecc389e86caa5827c97b9 | |
parent | 202fa20cbca2895f29f533e7b908544bcc0248f3 (diff) |
allow default rc_sys value to be set at build time
This allows the default value of rc_sys to be set when openrc is
compiled. This will allow openrc to be installed, e.g. on vserver guests
and will allow them to be rebooted without the need to edit rc.conf.
This patch is a combined effort between myself and Robin Johnson.
X-Gentoo-Bug: 357247
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=357247
-rw-r--r-- | README | 15 | ||||
-rw-r--r-- | etc/rc.conf.FreeBSD | 2 | ||||
-rw-r--r-- | etc/rc.conf.Linux | 2 | ||||
-rw-r--r-- | etc/rc.conf.NetBSD | 2 | ||||
-rw-r--r-- | mk/scripts.mk | 2 |
5 files changed, 19 insertions, 4 deletions
@@ -12,6 +12,7 @@ LIBNAME=lib64 DESTDIR=/tmp/openrc-image MKPAM=pam MKPKGCONFIG=no +MKRCSYS=prefix MKSELINUX=yes MKTERMCAP=ncurses MKTERMCAP=termcap @@ -33,6 +34,20 @@ LOCAL_PREFIX should be set when to where user maintained packages are. Only set LOCAL_PREFIX if different from PKG_PREFIX. PREFIX should be set when OpenRC is not installed to /. +MKRCSYS should be set only if you need to specify a default system +subtype. The subtype should be set to match the type of environment the +file is installed into, not the virtualization the environment is +capable of handling. Here is a list of subtypes and their meanings. + +jail FreeBSD jail +lxc Linux container +openvz Linux OpenVZ +prefix Linux and *BSD prefix system +uml UsermodeLinux +vserver Linux vserver +xen0 Linux and NetBSD xen0 Domain +xenU Linux and NetBSD xenU Domain + If any of the following files exist then we do not overwrite them /etc/devd.conf /etc/rc diff --git a/etc/rc.conf.FreeBSD b/etc/rc.conf.FreeBSD index 800c6cf4..139a8256 100644 --- a/etc/rc.conf.FreeBSD +++ b/etc/rc.conf.FreeBSD @@ -8,5 +8,5 @@ # This should be set to the value representing what environment this file is # PRESENTLY in, not what virtualization the environment is capable of. # See the OpenRC migration guide for more details. -rc_sys="" +rc_sys="@RC_SYS_DEFAULT@" diff --git a/etc/rc.conf.Linux b/etc/rc.conf.Linux index b110a81f..1400af5f 100644 --- a/etc/rc.conf.Linux +++ b/etc/rc.conf.Linux @@ -13,7 +13,7 @@ # This should be set to the value representing what environment this file is # PRESENTLY in, not what virtualization the environment is capable of. # See the OpenRC migration guide for more details. -rc_sys="" +rc_sys="@RC_SYS_DEFAULT@" ############################################################################## # LINUX SPECIFIC OPTIONS diff --git a/etc/rc.conf.NetBSD b/etc/rc.conf.NetBSD index b29000b7..3528a00a 100644 --- a/etc/rc.conf.NetBSD +++ b/etc/rc.conf.NetBSD @@ -9,5 +9,5 @@ # This should be set to the value representing what environment this file is # PRESENTLY in, not what virtualization the environment is capable of. # See the OpenRC migration guide for more details. -rc_sys="" +rc_sys="@RC_SYS_DEFAULT@" diff --git a/mk/scripts.mk b/mk/scripts.mk index 3517aabf..c45fed18 100644 --- a/mk/scripts.mk +++ b/mk/scripts.mk @@ -12,7 +12,7 @@ _PKG_SED:= $(shell ${_PKG_SED_SH}) _LCL_SED_SH= if test "${PREFIX}" = "${LOCAL_PREFIX}"; then echo "-e 's:@LOCAL_PREFIX@::g'"; else echo "-e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'"; fi _LCL_SED:= $(shell ${_LCL_SED_SH}) -SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' ${_PKG_SED} ${_LCL_SED} +SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' -e 's:@RC_SYS_DEFAULT@:${MKRCSYS}:g' ${_PKG_SED} ${_LCL_SED} # Tweak our shell scripts .SUFFIXES: .sh.in .in |