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

Collapse All | Expand All

(-)ntp-client.rc (-5 / +12 lines)
Lines 27-35 Link Here
27
	checkconfig || return $?
27
	checkconfig || return $?
28
28
29
	ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
29
	ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
30
	${NTPCLIENT_CMD} ${NTPCLIENT_OPTS} >/dev/null &
30
	
31
	local pid=$!
31
	if [ "${NTPCLIENT_CMD}" == "ntpdate" ]
32
	(sleep ${NTPCLIENT_TIMEOUT:-30}; kill -9 ${pid} >&/dev/null) &
32
	then
33
	wait ${pid}
33
		${NTPCLIENT_CMD} ${NTPCLIENT_OPTS} >/dev/null
34
	eend $? "Failed to set clock"
34
		eend $? "Failed to set clock"
35
	else
36
		${NTPCLIENT_CMD} ${NTPCLIENT_OPTS} >/dev/null &
37
		local pid=$!
38
		(sleep ${NTPCLIENT_TIMEOUT:-30}; kill -9 ${pid} >&/dev/null) &
39
		wait ${pid}
40
		eend $? "Failed to set clock"
41
	fi
35
}
42
}

Return to bug 109803