Move the shell code to check for RC_SYS to the keywords dependency.

This commit is contained in:
Roy Marples 2008-02-19 14:29:20 +00:00
parent 0364bb2c84
commit 42bfd7b6dc
6 changed files with 23 additions and 30 deletions

View File

@ -28,27 +28,23 @@ depend()
else else
before * before *
fi fi
keywords nouml novps noxenu
} }
setupopts() setupopts()
{ {
case "${RC_SYS}" in
UML|VPS|XENU)
utc="${RC_SYS}"
;;
*)
case "$(uname -m)" in case "$(uname -m)" in
s390*) s390*)
utc="s390" utc="s390"
;; ;;
*) *)
if [ -e /proc/devices ] && grep -q " cobd$" /proc/devices; then if [ -e /proc/devices ] && \
grep -q " cobd$" /proc/devices
then
utc="coLinux" utc="coLinux"
fi fi
;; ;;
esac esac
;;
esac
case "${utc}" in case "${utc}" in
UTC|Local" "Time);; UTC|Local" "Time);;

View File

@ -9,6 +9,7 @@ depend()
need localmount need localmount
need keymaps # sets up terminal encoding scheme need keymaps # sets up terminal encoding scheme
after hotplug after hotplug
keywords nouml novps noxenu
} }
start() start()
@ -16,13 +17,6 @@ start()
# Forget about any font until we are successful # Forget about any font until we are successful
rm -rf "${RC_LIBDIR}"/console rm -rf "${RC_LIBDIR}"/console
case "${RC_SYS}" in
UML|VPS|XENU)
ewarn "Not loading consolefont for ${RC_SYS} systems"
return 0
;;
esac
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}} ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
consolefont=${consolefont:-${CONSOLEFONT}} consolefont=${consolefont:-${CONSOLEFONT}}
unicodemap=${unicodemap:-${UNICODEMAP}} unicodemap=${unicodemap:-${UNICODEMAP}}

View File

@ -15,17 +15,11 @@ dumpkeys_charset=${dumpkeys_charset:-${DUMPKEYS_CHARSET}}
depend() depend()
{ {
need localmount need localmount
keywords nouml novps noxenu
} }
start() start()
{ {
case "${RC_SYS}" in
UML|VPS|XENU)
ewarn "Not loading keymaps for ${RC_SYS} systems"
return 0
;;
esac
if [ -z "${keymap}" ]; then if [ -z "${keymap}" ]; then
eerror "You need to setup keymap in /etc/conf.d/keymaps first" eerror "You need to setup keymap in /etc/conf.d/keymaps first"
return 1 return 1

View File

@ -7,13 +7,14 @@ description="Loads a user defined list of kernel modules."
depend() depend()
{ {
use isapnp use isapnp
keywords novps
} }
start() start()
{ {
# Should not fail if kernel do not have module # Should not fail if kernel do not have module
# support compiled in ... # support compiled in ...
[ ! -f /proc/modules -o "${RC_SYS}" = "VPS" ] && return 0 [ ! -f /proc/modules ] && return 0
local KV=$(uname -r) local KV=$(uname -r)
local KV_MAJOR=${KV%%.*} local KV_MAJOR=${KV%%.*}

View File

@ -6,11 +6,11 @@ depend()
{ {
use hostname use hostname
before bootmisc logger before bootmisc logger
keywords novps
} }
start() start()
{ {
[ "${RC_SYS}" = "VPS" ] && return 0
[ -e /etc/sysctl.conf ] || return 0 [ -e /etc/sysctl.conf ] || return 0
ebegin "Configuring kernel parameters" ebegin "Configuring kernel parameters"
sysctl -p /etc/sysctl.conf >/dev/null sysctl -p /etc/sysctl.conf >/dev/null

View File

@ -138,7 +138,15 @@ Tags a service with a keyword. Here's the keywords we currently understand:-
When in a jail, exclude this service from any dependencies. The service can When in a jail, exclude this service from any dependencies. The service can
still be run directly. still be run directly.
.It Dv notimeout .It Dv notimeout
do not time out waiting for that service. 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 noxen0
Same as nojail, but for Xen DOM0 systems.
.It Dv noxenu
Same as nojail, but for Xen DOMU systems.
.El .El
.El .El
.Pp .Pp