Remove prefix support

I spoke with the prefix team sometime back and was told that they do not
have an interest in using OpenRC on prefix systems.
This commit is contained in:
William Hubbs 2012-01-25 11:42:32 -06:00
parent 32c506a4c8
commit 3247184d86
49 changed files with 43 additions and 82 deletions

View File

@ -4,9 +4,7 @@
# This is the subsystem type. Valid options on FreeBSD:
# "" - nothing special
# "jail" - FreeBSD jails
# "prefix" - Prefix
# If this is commented out, automatic detection will be attempted.
# Note that automatic detection does not work in a prefix environment.
# If this is commented out, automatic detection will be used.
#
# This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of.

View File

@ -5,14 +5,11 @@
# "" - nothing special
# "lxc" - Linux Containers
# "openvz" - Linux OpenVZ
# "prefix" - Prefix
# "uml" - Usermode Linux
# "vserver" - Linux vserver
# "xen0" - Xen0 Domain
# "xenU" - XenU Domain
# If this is commented out, automatic detection will be attempted.
# Note that autodetection will not work in a prefix environment or in a
# linux container.
# If this is commented out, automatic detection will be used.
#
# This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of.

View File

@ -3,11 +3,9 @@
# This is the subsystem type. Valid options on NetBSD:
# "" - nothing special
# "prefix" - Prefix
# "xen0" - Xen0 Domain
# "xenU" - XenU Domain
# If this is commented out, automatic detection will be attempted.
# Note that automatic detection does not work in a prefix environment.
# If this is commented out, automatic detection will be used.
#
# This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of.

View File

@ -22,7 +22,7 @@ depend()
[ "$clock" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then
need root
fi
keyword -jail -prefix
keyword -jail
}
start()

View File

@ -7,7 +7,7 @@ depend()
need localmount
before logger
after clock sysctl
keyword -prefix -timeout
keyword -timeout
}
: ${wipe_tmp:=${WIPE_TMP:-yes}}

View File

@ -8,7 +8,7 @@ depend()
{
need localmount termencoding
after hotplug bootmisc
keyword -openvz -prefix -uml -vserver -xenu -lxc
keyword -openvz -uml -vserver -xenu -lxc
}
start()

View File

@ -10,7 +10,7 @@ depend() {
need localmount
after bootmisc
before net.lo0
keyword -jail -prefix
keyword -jail
}
start_pre() {

View File

@ -6,7 +6,7 @@ description="Mount system critical filesystems in /dev."
depend() {
use dev
keyword -prefix -vserver
keyword -vserver
}
start() {

View File

@ -6,7 +6,7 @@ description="Configures a specific kernel dump device."
depend() {
need swap
keyword -jail -prefix
keyword -jail
}
start() {

View File

@ -9,7 +9,7 @@ _IFS="
depend()
{
use dev clock modules
keyword -jail -openvz -prefix -timeout -vserver -lxc
keyword -jail -openvz -timeout -vserver -lxc
}
_abort() {

View File

@ -9,7 +9,7 @@ depend()
{
use root
before devd net
keyword -jail -prefix
keyword -jail
}
_set()

View File

@ -5,7 +5,7 @@
description="Sets the hostname of the machine."
depend() {
keyword -prefix -lxc
keyword -lxc
}
start()

View File

@ -28,7 +28,7 @@ depend()
else
before *
fi
keyword -openvz -prefix -uml -vserver -xenu -lxc
keyword -openvz -uml -vserver -xenu -lxc
}
setupopts()

View File

@ -8,7 +8,7 @@ depend()
{
need localmount termencoding
after bootmisc
keyword -openvz -prefix -uml -vserver -xenu -lxc
keyword -openvz -uml -vserver -xenu -lxc
}
start()

View File

@ -4,11 +4,6 @@
description="Kill all processes so we can unmount disks cleanly."
depend()
{
keyword -prefix
}
start()
{
ebegin "Terminating remaining processes"

View File

@ -9,7 +9,7 @@ depend()
need fsck
use lvm modules mtab
after lvm modules
keyword -jail -prefix -vserver -lxc
keyword -jail -openvz -vserver -lxc
}
start()

View File

@ -7,7 +7,7 @@ extra_commands="restore"
depend()
{
need localmount
keyword -jail -prefix
keyword -jail
}
restore()

View File

@ -7,7 +7,7 @@ description="Loads a user defined list of kernel modules."
depend()
{
use isapnp
keyword -openvz -prefix -vserver -lxc
keyword -openvz -vserver -lxc
}
start()

View File

@ -7,7 +7,7 @@ description="Re-mount filesytems read-only for a clean reboot."
depend()
{
need killprocs savecache
keyword -prefix -openvz -vserver -lxc
keyword -openvz -vserver -lxc
}
start()

View File

@ -16,7 +16,7 @@ depend()
{
need localmount
after bootmisc
keyword -jail -prefix
keyword -jail
}
start()

View File

@ -7,7 +7,6 @@ description="Update /etc/mtab to match what the kernel knows about"
depend()
{
need root
keyword -prefix
}
start()

View File

@ -20,7 +20,7 @@ depend()
need localmount
after bootmisc
keyword -jail -prefix -vserver
keyword -jail -vserver
case "${IFACE}" in
lo|lo0) provide lo;;

View File

@ -35,7 +35,7 @@ depend()
need net $pmap
use afc-client amd autofs openvpn
use dns nfs nfsmount portmap rpcbind rpc.statd rpc.lockd
keyword -jail -prefix -vserver
keyword -jail -vserver
}
start()

View File

@ -13,7 +13,7 @@ depend()
need localmount
after bootmisc
provide net
keyword -jail -prefix -vserver
keyword -jail -vserver
}
uniqify()

View File

@ -7,7 +7,6 @@ required_files="/etc/newsyslog.conf"
depend()
{
need localmount
keyword -prefix
}
start()

View File

@ -9,7 +9,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
depend()
{
need localmount
keyword -openvz -prefix -vserver -lxc
keyword -openvz -vserver -lxc
}
_setleds()

View File

@ -11,7 +11,7 @@ extra_started_commands="reload"
depend() {
need localmount
keyword -jail -prefix
keyword -jail
}
start()

View File

@ -12,7 +12,7 @@ depend()
need localmount
use logger
after bootmisc
keyword -jail -prefix
keyword -jail
}
start_pre()

View File

@ -8,7 +8,7 @@ depend()
{
use modules devfs
need localmount
keyword -prefix -vserver -lxc
keyword -openvz -vserver -lxc
}
start()

View File

@ -7,7 +7,6 @@ depend()
need localmount net
after *
before local
keyword -prefix
}
start()

View File

@ -7,7 +7,7 @@ description="Mount the root fs read/write"
depend()
{
need fsck
keyword -jail -openvz -prefix -vserver -lxc
keyword -jail -openvz -vserver -lxc
}
start()

View File

@ -7,7 +7,7 @@ description="Saves a kernel dump."
depend()
{
need localmount
keyword -jail -prefix
keyword -jail
}
start()

View File

@ -12,7 +12,7 @@ depend()
{
provide net
use network
keyword -jail -prefix -vserver
keyword -jail -vserver
}
pre_flight_checks()

View File

@ -5,7 +5,7 @@
depend()
{
before fsck
keyword -jail -prefix
keyword -jail
}
start()

View File

@ -5,7 +5,7 @@
depend()
{
before localmount
keyword -jail -openvz -prefix -vserver -lxc
keyword -jail -openvz -vserver -lxc
}
start()

View File

@ -8,7 +8,7 @@ depend()
{
before *
provide clock
keyword -openvz -prefix -uml -vserver -xenu -lxc
keyword -openvz -uml -vserver -xenu -lxc
}
# swclock is an OpenRC built in

View File

@ -4,7 +4,7 @@
depend() {
need localmount
keyword -jail -prefix
keyword -jail
}
start() {

View File

@ -5,7 +5,6 @@
depend()
{
before bootmisc logger
keyword -prefix
}
start()

View File

@ -5,7 +5,7 @@
depend()
{
before bootmisc logger
keyword -prefix -vserver
keyword -vserver
}
start()

View File

@ -6,7 +6,7 @@ description="Mount the sys filesystem."
depend()
{
keyword -prefix -vserver
keyword -vserver
}
mount_sys()

View File

@ -16,5 +16,4 @@ depend()
use net newsyslog
need localmount
after bootmisc
keyword -prefix
}

View File

@ -9,7 +9,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
depend()
{
keyword -openvz -prefix -uml -vserver -xenu
keyword -openvz -uml -vserver -xenu
use root
after bootmisc
}

View File

@ -5,7 +5,6 @@
depend()
{
after fsck
keyword -prefix
}
start()

View File

@ -8,7 +8,7 @@ description="Initializes the random number generator."
depend()
{
need localmount
keyword -jail -openvz -prefix
keyword -jail -openvz
}
save_seed()

View File

@ -5,7 +5,6 @@
depend()
{
need localmount
keyword -prefix
}
start()

View File

@ -175,8 +175,6 @@ in
Same as -jail, but for Linux Resource Containers (LXC).
.It Dv -openvz
Same as -jail, but for OpenVZ systems.
.It Dv -prefix
Same as -jail, but for Prefix systems.
.It Dv -uml
Same as -jail, but for UML systems.
.It Dv -vserver
@ -385,9 +383,8 @@ rc_provide_tap1="!net"
# To put in in /etc/rc.conf you would do it like this
rc_net_tap1_provide="!net"
# It's also possible to negate keywords. This is mainly useful for prefix
# users testing OpenRC.
rc_keyword="!noprefix"
# It's also possible to negate keywords.
rc_keyword="-keyword"
.Ed
.Sh EXAMPLES
.Pp

View File

@ -41,34 +41,24 @@ install:
if ! test -d "${SYSINITDIR}"; then \
${INSTALL} -d ${SYSINITDIR} || exit $$?; \
for x in ${SYSINIT}; do \
if test -n "${PREFIX}"; then \
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
fi; \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; \
done \
fi
if ! test -d "${BOOTDIR}"; then \
${INSTALL} -d ${BOOTDIR} || exit $$?; \
for x in ${BOOT}; do \
if test -n "${PREFIX}"; then \
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
fi; \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \
done \
fi
if ! test -d "${DEFAULTDIR}"; then \
${INSTALL} -d ${DEFAULTDIR} || exit $$?; \
for x in ${DEFAULT}; do \
if test -n "${PREFIX}"; then \
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
fi; \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; \
done \
fi
if ! test -d "${SHUTDOWNDIR}"; then \
${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \
for x in ${SHUTDOWN}; do \
if test -n "${PREFIX}"; then \
grep -q "keyword .*noprefix" ${INITDIR}/"$$x" && continue; \
fi; \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
fi

View File

@ -216,7 +216,6 @@ rc_sys_v2(void)
}
/* Now do detection */
__STRING_SWITCH(systype)
__STRING_CASE(RC_SYS_PREFIX) { return RC_SYS_PREFIX; }
#ifdef __FreeBSD__
__STRING_CASE(RC_SYS_JAIL) { return RC_SYS_JAIL; }
#endif /* __FreeBSD__ */
@ -246,10 +245,6 @@ librc_hidden_def(rc_sys_v2)
const char *
rc_sys_v1(void)
{
#ifdef PREFIX
return RC_SYS_PREFIX;
#else
#ifdef __FreeBSD__
int jailed = 0;
size_t len = sizeof(jailed);
@ -286,7 +281,6 @@ rc_sys_v1(void)
#endif
return NULL;
#endif /* PREFIX */
}
librc_hidden_def(rc_sys_v1)

View File

@ -276,7 +276,6 @@ bool rc_service_daemons_crashed(const char *);
#define RC_SYS_JAIL "JAIL"
#define RC_SYS_OPENVZ "OPENVZ"
#define RC_SYS_LXC "LXC"
#define RC_SYS_PREFIX "PREFIX"
#define RC_SYS_UML "UML"
#define RC_SYS_VSERVER "VSERVER"
#define RC_SYS_XEN0 "XEN0"