summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.d.Linux/clock.in2
-rw-r--r--init.d.Linux/consolefont.in2
-rw-r--r--init.d.Linux/keymaps.in2
-rw-r--r--init.d.Linux/modules.in2
-rw-r--r--init.d.Linux/numlock.in2
-rw-r--r--init.d.Linux/procfs.in2
-rw-r--r--init.d.Linux/sysctl.in2
-rw-r--r--init.d/bootmisc.in2
-rw-r--r--init.d/fsck.in2
-rw-r--r--init.d/halt.sh.in2
-rw-r--r--init.d/localmount.in5
-rw-r--r--init.d/netmount.in2
-rw-r--r--init.d/root.in2
-rw-r--r--init.d/swap.in2
-rw-r--r--man/runscript.88
-rw-r--r--sh.Linux/init.sh.in10
-rw-r--r--sh/net.sh.in2
-rw-r--r--src/librc/librc.c7
-rw-r--r--src/librc/rc.h3
-rw-r--r--src/rc/rc.c4
20 files changed, 36 insertions, 29 deletions
diff --git a/init.d.Linux/clock.in b/init.d.Linux/clock.in
index 88c61c7..0bb7198 100644
--- a/init.d.Linux/clock.in
+++ b/init.d.Linux/clock.in
@@ -28,7 +28,7 @@ depend()
else
before *
fi
- keyword noprefix nouml novps noxenu
+ keyword noopenvz noprefix nouml novserver noxenu
}
setupopts()
diff --git a/init.d.Linux/consolefont.in b/init.d.Linux/consolefont.in
index 4244180..384004d 100644
--- a/init.d.Linux/consolefont.in
+++ b/init.d.Linux/consolefont.in
@@ -9,7 +9,7 @@ depend()
need localmount
need keymaps # sets up terminal encoding scheme
after hotplug
- keyword noprefix nouml novps noxenu
+ keyword noopenvz noprefix nouml novserver noxenu
}
start()
diff --git a/init.d.Linux/keymaps.in b/init.d.Linux/keymaps.in
index bb601c6..2079e04 100644
--- a/init.d.Linux/keymaps.in
+++ b/init.d.Linux/keymaps.in
@@ -15,7 +15,7 @@ dumpkeys_charset=${dumpkeys_charset:-${DUMPKEYS_CHARSET}}
depend()
{
need localmount
- keyword noprefix nouml novps noxenu
+ keyword noopenvz noprefix nouml novserver noxenu
}
start()
diff --git a/init.d.Linux/modules.in b/init.d.Linux/modules.in
index 3f0e0da..b09620d 100644
--- a/init.d.Linux/modules.in
+++ b/init.d.Linux/modules.in
@@ -7,7 +7,7 @@ description="Loads a user defined list of kernel modules."
depend()
{
use isapnp
- keyword noprefix novps
+ keyword noopenvz noprefix novserver
}
start()
diff --git a/init.d.Linux/numlock.in b/init.d.Linux/numlock.in
index fd23ede..1a71367 100644
--- a/init.d.Linux/numlock.in
+++ b/init.d.Linux/numlock.in
@@ -9,7 +9,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER}:-12}
depend()
{
need localmount
- keyword noprefix
+ keyword noopenvz noprefix novserver
}
_setleds()
diff --git a/init.d.Linux/procfs.in b/init.d.Linux/procfs.in
index d286ca9..a30fd92 100644
--- a/init.d.Linux/procfs.in
+++ b/init.d.Linux/procfs.in
@@ -7,7 +7,7 @@ description="Mounts misc filesystems in /proc."
depend()
{
need localmount
- keyword noprefix
+ keyword noopenvz noprefix novserver
}
start()
diff --git a/init.d.Linux/sysctl.in b/init.d.Linux/sysctl.in
index 19408ca..ad6b2a9 100644
--- a/init.d.Linux/sysctl.in
+++ b/init.d.Linux/sysctl.in
@@ -6,7 +6,7 @@ depend()
{
use hostname
before bootmisc logger
- keyword noprefix novps
+ keyword noopenvz noprefix novserver
}
start()
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index f98cf6b..08f9cc5 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -113,7 +113,7 @@ start()
[ -x /sbin/restorecon ] && restorecon /tmp/.ICE-unix /tmp/.X11-unix
# Create an 'after-boot' dmesg log
- if [ "${RC_SYS}" != "VPS" ]; then
+ if [ "${RC_SYS}" != "VSERVER" -a "${RC_SYS}" != "OPENVZ" ]; then
dmesg > /var/log/dmesg
chmod 640 /var/log/dmesg
fi
diff --git a/init.d/fsck.in b/init.d/fsck.in
index 61aa947..967eee3 100644
--- a/init.d/fsck.in
+++ b/init.d/fsck.in
@@ -9,7 +9,7 @@ _ISF="
depend()
{
after clock modules
- keyword nojail noprefix notimeout
+ keyword nojail noopenvz noprefix notimeout novserver
}
_abort() {
diff --git a/init.d/halt.sh.in b/init.d/halt.sh.in
index 39dd4f4..dca6815 100644
--- a/init.d/halt.sh.in
+++ b/init.d/halt.sh.in
@@ -27,7 +27,7 @@ sync; sync
# If we are in a VPS, we don't need anything below here, because
# 1) we don't need (and by default can't) umount anything (VServer) or
# 2) the host utils take care of all umounting stuff (OpenVZ)
-if [ "${RC_SYS}" = "VPS" ]; then
+if [ "${RC_SYS}" = "VSERVER" -o "${RC_SYS}" = "OPENVZ" ]; then
if [ -e /etc/init.d/"$1".sh ]; then
. /etc/init.d/"$1".sh
else
diff --git a/init.d/localmount.in b/init.d/localmount.in
index 4c7d5fd..9d95a8a 100644
--- a/init.d/localmount.in
+++ b/init.d/localmount.in
@@ -8,7 +8,7 @@ depend()
{
need fsck
use modules mtab
- keyword nojail noprefix
+ keyword nojail noopenvz noprefix novserver
}
start()
@@ -29,9 +29,6 @@ start()
stop()
{
- # Don't unmount anything for VPS systems
- [ "${RC_SYS}" = "VPS" ] && return 0
-
# We never unmount / or /dev or $RC_SVCDIR
local x= no_umounts="/|/dev|/dev/.*|${RC_SVCDIR}"
diff --git a/init.d/netmount.in b/init.d/netmount.in
index f136f45..3219c83 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -34,7 +34,7 @@ depend()
config /etc/fstab
need net ${pmap}
use afc-client amd autofs dns nfs nfsmount portmap rpcbind rpc.statd
- keyword nojail noprefix
+ keyword nojail noopenvz noprefix novserver
}
start()
diff --git a/init.d/root.in b/init.d/root.in
index da21db5..c87b7f1 100644
--- a/init.d/root.in
+++ b/init.d/root.in
@@ -7,7 +7,7 @@ description="Mount the root fs read/write"
depend()
{
need fsck
- keyword nojail noprefix
+ keyword nojail noopenvz noprefix novserver
}
start()
diff --git a/init.d/swap.in b/init.d/swap.in
index 0404af1..f64ddc5 100644
--- a/init.d/swap.in
+++ b/init.d/swap.in
@@ -5,7 +5,7 @@
depend()
{
need localmount
- keyword nojail noprefix
+ keyword nojail noopenvz noprefix novserver
}
start()
diff --git a/man/runscript.8 b/man/runscript.8
index 79f957c..1b9488f 100644
--- a/man/runscript.8
+++ b/man/runscript.8
@@ -137,12 +137,14 @@ Tags a service with a keyword. Here's the keywords we currently understand:-
.It Dv nojail
When in a jail, exclude this service from any dependencies. The service can
still be run directly.
+.It Dv noopenvz
+Same as nojail, but for OpenVZ systems.
.It Dv notimeout
Do not time out waiting for that service.
.It Dv nouml
Same as nojail, but for UML systems.
-.It Dv novps
-Same as nojail, but for VServer and OpenVZ systems.
+.It Dv novserver
+Same as nojail, but for VServer systems.
.It Dv noxen0
Same as nojail, but for Xen DOM0 systems.
.It Dv noxenu
@@ -284,7 +286,7 @@ Boot runlevel chosen. Default is boot.
Default runlevel chosen. Default is default.
.It Va RC_SYS
A special variable to describe the system more.
-Possible values are XENU, XEN0, UML and VPS.
+Possible values are OPENVZ, XENU, XEN0, UML and VSERVER.
.It Va RC_UNAME
The result of `uname -s`.
.El
diff --git a/sh.Linux/init.sh.in b/sh.Linux/init.sh.in
index 90dbea8..190f8f1 100644
--- a/sh.Linux/init.sh.in
+++ b/sh.Linux/init.sh.in
@@ -65,7 +65,7 @@ mount_svcdir()
# Set the console loglevel to 1 for a cleaner boot
# the logger should anyhow dump the ring-0 buffer at start to the
# logs, and that with dmesg can be used to check for problems
-if [ -n "${dmesg_level}" -a "${RC_SYS}" != "VPS" ]; then
+if [ -n "${dmesg_level}" -a "${RC_SYS}" != "VSERVER" ]; then
dmesg -n "${dmesg_level}"
fi
@@ -108,7 +108,10 @@ if [ -r /sbin/livecd-functions.sh ]; then
livecd_read_commandline
fi
-if [ "${RC_UNAME}" != "GNU/kFreeBSD" -a "${RC_SYS}" != "VPS" ]; then
+if [ "${RC_UNAME}" != "GNU/kFreeBSD" \
+ -a "${RC_SYS}" != "VSERVER" \
+ -a "${RC_SYS}" != "OPENVZ" ]
+then
if grep -Eq "[[:space:]]+sysfs$" /proc/filesystems; then
if [ -d /sys ]; then
if ! mountinfo --quiet /sys; then
@@ -128,7 +131,8 @@ fi
# Try to figure out how the user wants /dev handled
if [ "${rc_devices}" = "static" \
- -o "${RC_SYS}" = "VPS" \
+ -o "${RC_SYS}" = "VSERVER" \
+ -o "${RC_SYS}" = "OPENVZ" \
-o "${RC_UNAME}" = "GNU/kFreeBSD" ]
then
ebegin "Using existing device nodes in /dev"
diff --git a/sh/net.sh.in b/sh/net.sh.in
index 1fe52f1..1ad9998 100644
--- a/sh/net.sh.in
+++ b/sh/net.sh.in
@@ -21,7 +21,7 @@ depend()
need localmount
after bootmisc
provide net
- keyword nojail noprefix
+ keyword nojail noprefix novserver
case "${IFACE}" in
lo|lo0);;
diff --git a/src/librc/librc.c b/src/librc/librc.c
index 16b0f0b..c6280d1 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -207,8 +207,11 @@ const char *rc_sys (void)
} else if (file_regex ("/proc/cpuinfo", "UML"))
return (RC_SYS_UML);
else if (file_regex ("/proc/self/status",
- "(s_context|VxID|envID):[[:space:]]*[1-9]"))
- return (RC_SYS_VPS);
+ "(s_context|VxID):[[:space:]]*[1-9]"))
+ return (RC_SYS_VSERVER);
+ else if (file_regex ("/proc/self/status",
+ "envID:[[:space:]]*[1-9]"))
+ return (RC_SYS_OPENVZ);
#endif
return (NULL);
diff --git a/src/librc/rc.h b/src/librc/rc.h
index d2fde60..0b811f4 100644
--- a/src/librc/rc.h
+++ b/src/librc/rc.h
@@ -232,9 +232,10 @@ bool rc_service_daemons_crashed (const char *service);
* OpenRC can support some special sub system types, normally virtualization.
* Some services cannot work in these systems, or we do something else. */
#define RC_SYS_JAIL "JAIL"
+#define RC_SYS_OPENVZ "OPENVZ"
#define RC_SYS_PREFIX "PREFIX"
#define RC_SYS_UML "UML"
-#define RC_SYS_VPS "VPS"
+#define RC_SYS_VSERVER "VSERVER"
#define RC_SYS_XEN0 "XEN0"
#define RC_SYS_XENU "XENU"
const char *rc_sys (void);
diff --git a/src/rc/rc.c b/src/rc/rc.c
index 183c23c..e1b7ac3 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -289,8 +289,8 @@ static void sulogin (bool cont)
#ifdef __linux__
char *e = getenv ("RC_SYS");
- /* VPS systems cannot do a sulogin */
- if (e && strcmp (e, "VPS") == 0) {
+ /* VSERVER and OPENVZ systems cannot do a sulogin */
+ if (e && (strcmp (e, "VSERVER") == 0 || strcmp (e, "OPENVZ") == 0) {
execl ("/sbin/halt", "/sbin/halt", "-f", (char *) NULL);
eerrorx ("%s: unable to exec `/sbin/halt': %s", applet, strerror (errno));
}