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

Collapse All | Expand All

(-)functions.sh (-19 / +37 lines)
Lines 22-30 Link Here
22
# Size of $svcdir in KB
22
# Size of $svcdir in KB
23
svcsize="1024"
23
svcsize="1024"
24
24
25
# tmpfs mount point for diskless nodes
26
shmdir="/mnt/.shm"
27
28
# Different types of dependancies
25
# Different types of dependancies
29
deptypes="need use"
26
deptypes="need use"
30
27
Lines 74-79 Link Here
74
71
75
HILITE=$'\e[36;01m'
72
HILITE=$'\e[36;01m'
76
73
74
if [ -e /proc/cmdline ]
75
then 
76
	for copt in `cat /proc/cmdline`
77
	do
78
		if [ "${copt%=*}" = "softlevel" ]
79
		then
80
			forcedlevel="${copt##*=}"
81
			CONFSUFFIX=".${forcedlevel}"
82
		elif [ "${copt%=*}" = "bootlevel" ]
83
		then
84
			BOOTLEVEL="${copt##*=}"
85
		fi
86
	done
87
88
	if [ -d "/etc/runlevels/boot${CONFSUFFIX}" \
89
	     -o -L "/etc/runlevels/boot${CONFSUFFIX}" \
90
	     -a ! "${BOOTLEVEL}" ]
91
	then
92
		BOOTLEVEL="boot${CONFSUFFIX}"
93
	else
94
		BOOTLEVEL="boot"
95
	fi
96
97
fi
98
77
esyslog() {
99
esyslog() {
78
	if [ -x /usr/bin/logger ]
100
	if [ -x /usr/bin/logger ]
79
	then
101
	then
Lines 205-226 Link Here
205
	return ${retval}
227
	return ${retval}
206
}
228
}
207
229
208
# int checkserver(void)
209
#
210
#    Return 0 (no error) if this script is executed 
211
#    onto the server, one otherwise.
212
#    See the boot section of /sbin/rc for more details.
213
# 
214
checkserver() {
215
	# Only do check if 'gentoo=adelie' is given as kernel param
216
	if get_bootparam "adelie"
217
	then
218
		[ "`cat ${svcdir}/hostname`" = "(none)" ] || return 1
219
	fi
220
	
221
	return 0
222
}
223
224
# int KV_to_int(string)
230
# int KV_to_int(string)
225
#
231
#
226
#   Convert a string type kernel version (2.4.0) to an int (132096)
232
#   Convert a string type kernel version (2.4.0) to an int (132096)
Lines 361-365 Link Here
361
	fi
367
	fi
362
}
368
}
363
369
370
# char *add_suffix(char * configfile)
371
#
372
# Returns a config file name with the softlevel suffix
373
# appended to it.  For use with multi-config services.
374
add_suffix () {
375
	if [ -e ${1}${CONFSUFFIX} ] 
376
	then
377
		echo ${1}${CONFSUFFIX}
378
	else
379
		echo ${1}
380
	fi
381
}
364
382
365
# vim:ts=4
383
# vim:ts=4

Return to bug 4151