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

(-)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
(-)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.4 2005/02/04 06:24:42 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.64.2.4 2005/02/04 06:24:42 vapier Exp $
4
4
5
# Linux 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" ] && \
(-)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 ]
(-)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