}
start() {
# VServers aren't allowed to fsck by default
is_vserver_sys && return 0
local retval=0
# Start software raid.
# VServers aren't allowed to fsck/mount by default
if [[ ! -f /fastboot && -z ${CDBOOT} ]] ; then
setupopts() {
if is_uml_sys ; then
TBLURB="UML"
fakeit=1
return 0
elif is_vserver_sys ; then
TBLURB="VServer"
elif grep -q ' cobd$' /proc/devices ; then
TBLURB="coLinux"
elif [[ ${CLOCK} == "UTC" ]] ; then
myopts="--utc"
local myopts=""
local myadj=""
local TBLURB=""
local TBLURB="" fakeit=0
local errstr=""
local readonly="no"
local ret=0
setupopts
ebegin "Setting system clock to hardware clock [${TBLURB}]"
if [[ ${TBLURB} == "UML" ]] || [[ ${TBLURB} == "coLinux" ]] ; then
if [[ ${fakeit} -eq 1 ]] ; then
ret=0
elif [[ -x /sbin/hwclock ]] ; then
ebegin "Setting user font"
eend 0
elif [[ -z ${CONSOLEFONT} ]] ; then
ebegin "Using the default console font"
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.64.2.3 2005/01/30 22:01:18 vapier Exp $
# VServers don't need to handle mounts/etc...
is_vserver_sys && exit 0
# Check to see if this is a livecd, if it is read the commandline
# this mainly makes sure $CDBOOT is defined if it's a livecd
[ -f "/sbin/livecd-functions.sh" ] && \
# VServers don't need to set the hostname
local myhost=$(/bin/hostname 2>/dev/null)
ebegin "Loading key mappings"
fi
local WINDOWKEYS_KEYMAP=
# VServers aren't allowed to mount by default
# Mount local filesystems in /etc/fstab.
ebegin "Mounting local filesystems"
mount -at noproc,noshm,no${NET_FS_LIST// /,no} >/dev/null
# support compiled in ...
[ -f /proc/modules ] || return 0
# VServer's don't do modules
# Here we should fail, as a modular kernel do need
# depmod command ...
if [ ! -x /sbin/depmod ]
# $Header: /var/cvsroot/gentoo-src/rc-scripts/net-scripts/init.d/net.lo,v 1.38.2.13 2005/01/25 10:42:54 uberlord Exp $
# VServers aren't allowed to handle interfaces themselves
# Contributed by Roy Marples (uberlord@gentoo.org)
# Many thanks to Aron Griffis (agriffis@gentoo.org)
# for help, ideas and patches
# EXAMPLE: if is_uml_sys ; then ...
#
is_uml_sys() {
grep -q 'UML' /proc/cpuinfo &> /dev/null
grep -qs 'UML' /proc/cpuinfo
return $?
# bool is_vserver_sys()
# return 0 if the currently running system is a Linux VServer
# EXAMPLE: if is_vserver_sys ; then ...
is_vserver_sys() {
grep -qs '^s_context:[[:space:]]*[1-9]' /proc/self/status