Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 235647
Collapse All | Expand All

(-)openrc-0.2.5.orig/conf.d/hwclock (+4 lines)
Lines 12-14 Link Here
12
# If you wish to pass any other arguments to hwclock during bootup,
12
# If you wish to pass any other arguments to hwclock during bootup,
13
# you may do so here. Alpha users may wish to use --arc or --srm here.
13
# you may do so here. Alpha users may wish to use --arc or --srm here.
14
clock_args=""
14
clock_args=""
15
16
# If you wish to use a specific RTC device, you should specify it here.
17
# You normally won't need to touch this.
18
clock_rtc_device="/dev/rtc"
(-)openrc-0.2.5.orig/init.d/hwclock.in (-3 / +12 lines)
Lines 21-26 Link Here
21
	utc_cmd="--localtime"
21
	utc_cmd="--localtime"
22
fi
22
fi
23
23
24
if [ "${clock_rtc_device}" != "/dev/rtc" ]; then
25
	clock_args="${clock_args} --rtc=${clock_rtc_device}"
26
fi
27
24
depend()
28
depend()
25
{
29
{
26
	provide clock
30
	provide clock
Lines 73-83 Link Here
73
		return 0
77
		return 0
74
	fi
78
	fi
75
79
76
	ebegin "Setting system clock using the hardware clock [${utc}]"
80
	if [ -e /proc/modules -a ! -e ${clock_rtc_device} ]; then
77
	if [ -e /proc/modules -a ! -e /dev/rtc ]; then
81
		ebegin "Probing for RTC module"
78
		modprobe -q rtc || modprobe -q genrtc
82
		modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc
83
		[ -e ${clock_rtc_device} ]
84
		retval=$?
85
		eend $retval
86
		[ $retval -ne 0 ] && return 1
79
	fi
87
	fi
80
88
89
	ebegin "Setting system clock using the hardware clock [${utc}]"
81
	if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then
90
	if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then
82
		_hwclock --adjust ${utc_cmd}
91
		_hwclock --adjust ${utc_cmd}
83
		retval=$((${retval} + $?))
92
		retval=$((${retval} + $?))

Return to bug 235647