Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 55973 | Differences between
and this patch

Collapse All | Expand All

(-)rc-scripts-1.6.9/init.d/checkfs (+3 lines)
Lines 8-13 Link Here
8
}
8
}
9
9
10
start() {
10
start() {
11
	# VServers aren't allowed to fsck by default
12
	is_vserver_sys && return 0
13
	
11
	local retval=0
14
	local retval=0
12
15
13
	# Start software raid.
16
	# Start software raid.
(-)rc-scripts-1.6.9/init.d/checkroot (+3 lines)
Lines 8-13 Link Here
8
}
8
}
9
9
10
start() {
10
start() {
11
	# VServers aren't allowed to fsck/mount by default
12
	is_vserver_sys && return 0
13
	
11
	local retval=0
14
	local retval=0
12
	
15
	
13
	if [[ ! -f /fastboot && -z ${CDBOOT} ]] ; then
16
	if [[ ! -f /fastboot && -z ${CDBOOT} ]] ; then
(-)rc-scripts-1.6.9/init.d/clock (-2 / +8 lines)
Lines 12-20 Link Here
12
setupopts() {
12
setupopts() {
13
	if is_uml_sys ; then
13
	if is_uml_sys ; then
14
		TBLURB="UML"
14
		TBLURB="UML"
15
		fakeit=1
16
		return 0
17
	elif is_vserver_sys ; then
18
		TBLURB="VServer"
19
		fakeit=1
15
		return 0
20
		return 0
16
	elif grep -q ' cobd$' /proc/devices ; then
21
	elif grep -q ' cobd$' /proc/devices ; then
17
		TBLURB="coLinux"
22
		TBLURB="coLinux"
23
		fakeit=1
18
		return 0
24
		return 0
19
	elif [[ ${CLOCK} == "UTC" ]] ; then
25
	elif [[ ${CLOCK} == "UTC" ]] ; then
20
		myopts="--utc"
26
		myopts="--utc"
Lines 47-53 Link Here
47
start() {
53
start() {
48
	local myopts=""
54
	local myopts=""
49
	local myadj=""
55
	local myadj=""
50
	local TBLURB=""
56
	local TBLURB="" fakeit=0
51
	local errstr=""
57
	local errstr=""
52
	local readonly="no"
58
	local readonly="no"
53
	local ret=0
59
	local ret=0
Lines 61-67 Link Here
61
	setupopts
67
	setupopts
62
68
63
	ebegin "Setting system clock to hardware clock [${TBLURB}]"
69
	ebegin "Setting system clock to hardware clock [${TBLURB}]"
64
	if [[ ${TBLURB} == "UML" ]] || [[ ${TBLURB} == "coLinux" ]] ; then
70
	if [[ ${fakeit} -eq 1 ]] ; then
65
		ret=0
71
		ret=0
66
72
67
	elif [[ -x /sbin/hwclock ]] ; then
73
	elif [[ -x /sbin/hwclock ]] ; then
(-)rc-scripts-1.6.9/init.d/consolefont (+4 lines)
Lines 14-19 Link Here
14
		ebegin "Setting user font"
14
		ebegin "Setting user font"
15
		eend 0
15
		eend 0
16
		return 0
16
		return 0
17
	elif is_vserver_sys ; then
18
		ebegin "Setting user font"
19
		eend 0
20
		return 0
17
	elif [[ -z ${CONSOLEFONT} ]] ; then
21
	elif [[ -z ${CONSOLEFONT} ]] ; then
18
		ebegin "Using the default console font"
22
		ebegin "Using the default console font"
19
		eend 0
23
		eend 0
(-)rc-scripts-1.6.9/init.d/halt.sh (+3 lines)
Lines 2-7 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.64.2.3 2005/01/30 22:01:18 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.64.2.3 2005/01/30 22:01:18 vapier Exp $
4
4
5
# VServers don't need to handle mounts/etc...
6
is_vserver_sys && exit 0
7
5
# Check to see if this is a livecd, if it is read the commandline
8
# Check to see if this is a livecd, if it is read the commandline
6
# this mainly makes sure $CDBOOT is defined if it's a livecd
9
# this mainly makes sure $CDBOOT is defined if it's a livecd
7
[ -f "/sbin/livecd-functions.sh" ] && \
10
[ -f "/sbin/livecd-functions.sh" ] && \
(-)rc-scripts-1.6.9/init.d/hostname (+3 lines)
Lines 8-13 Link Here
8
}
8
}
9
9
10
start() {
10
start() {
11
	# VServers don't need to set the hostname
12
	is_vserver_sys && return 0
13
	
11
	local myhost=$(/bin/hostname 2>/dev/null)
14
	local myhost=$(/bin/hostname 2>/dev/null)
12
	local retval=0
15
	local retval=0
13
16
(-)rc-scripts-1.6.9/init.d/keymaps (+4 lines)
Lines 24-29 Link Here
24
		ebegin "Loading key mappings"
24
		ebegin "Loading key mappings"
25
		eend 0
25
		eend 0
26
		return 0
26
		return 0
27
	elif is_vserver_sys ; then
28
		ebegin "Loading key mappings"
29
		eend 0
30
		return 0
27
	fi
31
	fi
28
32
29
	local WINDOWKEYS_KEYMAP=
33
	local WINDOWKEYS_KEYMAP=
(-)rc-scripts-1.6.9/init.d/localmount (+3 lines)
Lines 8-13 Link Here
8
}
8
}
9
9
10
start() {
10
start() {
11
	# VServers aren't allowed to mount by default
12
	is_vserver_sys && return 0
13
	
11
	# Mount local filesystems in /etc/fstab.
14
	# Mount local filesystems in /etc/fstab.
12
	ebegin "Mounting local filesystems"
15
	ebegin "Mounting local filesystems"
13
	mount -at noproc,noshm,no${NET_FS_LIST// /,no} >/dev/null
16
	mount -at noproc,noshm,no${NET_FS_LIST// /,no} >/dev/null
(-)rc-scripts-1.6.9/init.d/modules (+3 lines)
Lines 73-78 Link Here
73
	# support compiled in ...
73
	# support compiled in ...
74
	[ -f /proc/modules ] || return 0
74
	[ -f /proc/modules ] || return 0
75
75
76
	# VServer's don't do modules
77
	is_vserver_sys && return 0
78
76
	# Here we should fail, as a modular kernel do need
79
	# Here we should fail, as a modular kernel do need
77
	# depmod command ...
80
	# depmod command ...
78
	if [ ! -x /sbin/depmod ]
81
	if [ ! -x /sbin/depmod ]
(-)rc-scripts-1.6.9/init.d/net.eth0 (+3 lines)
Lines 3-8 Link Here
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $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 $
4
# $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 $
5
5
6
# VServers aren't allowed to handle interfaces themselves
7
is_vserver_sys && exit 0
8
6
# Contributed by Roy Marples (uberlord@gentoo.org)
9
# Contributed by Roy Marples (uberlord@gentoo.org)
7
# Many thanks to Aron Griffis (agriffis@gentoo.org)
10
# Many thanks to Aron Griffis (agriffis@gentoo.org)
8
# for help, ideas and patches
11
# for help, ideas and patches
(-)rc-scripts-1.6.9/init.d/net.lo (+3 lines)
Lines 3-8 Link Here
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $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 $
4
# $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 $
5
5
6
# VServers aren't allowed to handle interfaces themselves
7
is_vserver_sys && exit 0
8
6
# Contributed by Roy Marples (uberlord@gentoo.org)
9
# Contributed by Roy Marples (uberlord@gentoo.org)
7
# Many thanks to Aron Griffis (agriffis@gentoo.org)
10
# Many thanks to Aron Griffis (agriffis@gentoo.org)
8
# for help, ideas and patches
11
# for help, ideas and patches
(-)rc-scripts-1.6.9/sbin/functions.sh (-1 / +12 lines)
Lines 615-621 Link Here
615
#   EXAMPLE:  if is_uml_sys ; then ...
615
#   EXAMPLE:  if is_uml_sys ; then ...
616
#
616
#
617
is_uml_sys() {
617
is_uml_sys() {
618
	grep -q 'UML' /proc/cpuinfo &> /dev/null
618
	grep -qs 'UML' /proc/cpuinfo
619
	return $?
620
}
621
622
# bool is_vserver_sys()
623
#
624
#   return 0 if the currently running system is a Linux VServer
625
#
626
#   EXAMPLE:  if is_vserver_sys ; then ...
627
#
628
is_vserver_sys() {
629
	grep -qs '^s_context:[[:space:]]*[1-9]' /proc/self/status
619
	return $?
630
	return $?
620
}
631
}
621
632

Return to bug 55973