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

View File

@ -5,14 +5,11 @@
# "" - nothing special # "" - nothing special
# "lxc" - Linux Containers # "lxc" - Linux Containers
# "openvz" - Linux OpenVZ # "openvz" - Linux OpenVZ
# "prefix" - Prefix
# "uml" - Usermode Linux # "uml" - Usermode Linux
# "vserver" - Linux vserver # "vserver" - Linux vserver
# "xen0" - Xen0 Domain # "xen0" - Xen0 Domain
# "xenU" - XenU Domain # "xenU" - XenU Domain
# If this is commented out, automatic detection will be attempted. # If this is commented out, automatic detection will be used.
# Note that autodetection will not work in a prefix environment or in a
# linux container.
# #
# This should be set to the value representing the environment this file is # This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of. # 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: # This is the subsystem type. Valid options on NetBSD:
# "" - nothing special # "" - nothing special
# "prefix" - Prefix
# "xen0" - Xen0 Domain # "xen0" - Xen0 Domain
# "xenU" - XenU Domain # "xenU" - XenU Domain
# If this is commented out, automatic detection will be attempted. # If this is commented out, automatic detection will be used.
# Note that automatic detection does not work in a prefix environment.
# #
# This should be set to the value representing the environment this file is # This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of. # 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 [ "$clock" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then
need root need root
fi fi
keyword -jail -prefix keyword -jail
} }
start() start()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -216,7 +216,6 @@ rc_sys_v2(void)
} }
/* Now do detection */ /* Now do detection */
__STRING_SWITCH(systype) __STRING_SWITCH(systype)
__STRING_CASE(RC_SYS_PREFIX) { return RC_SYS_PREFIX; }
#ifdef __FreeBSD__ #ifdef __FreeBSD__
__STRING_CASE(RC_SYS_JAIL) { return RC_SYS_JAIL; } __STRING_CASE(RC_SYS_JAIL) { return RC_SYS_JAIL; }
#endif /* __FreeBSD__ */ #endif /* __FreeBSD__ */
@ -246,10 +245,6 @@ librc_hidden_def(rc_sys_v2)
const char * const char *
rc_sys_v1(void) rc_sys_v1(void)
{ {
#ifdef PREFIX
return RC_SYS_PREFIX;
#else
#ifdef __FreeBSD__ #ifdef __FreeBSD__
int jailed = 0; int jailed = 0;
size_t len = sizeof(jailed); size_t len = sizeof(jailed);
@ -286,7 +281,6 @@ rc_sys_v1(void)
#endif #endif
return NULL; return NULL;
#endif /* PREFIX */
} }
librc_hidden_def(rc_sys_v1) 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_JAIL "JAIL"
#define RC_SYS_OPENVZ "OPENVZ" #define RC_SYS_OPENVZ "OPENVZ"
#define RC_SYS_LXC "LXC" #define RC_SYS_LXC "LXC"
#define RC_SYS_PREFIX "PREFIX"
#define RC_SYS_UML "UML" #define RC_SYS_UML "UML"
#define RC_SYS_VSERVER "VSERVER" #define RC_SYS_VSERVER "VSERVER"
#define RC_SYS_XEN0 "XEN0" #define RC_SYS_XEN0 "XEN0"