swclock: select a default reference file

If $RC_SVCDIR/shutdowntime does not exist, we need a default reference
file. It is safe to use @PREFIX@/sbin/runscript for this purpose.

Reported-By: Robin H. Johnson <robbat2@gentoo.org>
X-Gentoo-Bug: 376249
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=376249
This commit is contained in:
William Hubbs 2011-07-28 09:12:35 -05:00
parent 370e5c775a
commit 3688c85163

View File

@ -16,7 +16,9 @@ depend()
start() start()
{ {
ebegin "Setting the local clock based on last shutdown time" ebegin "Setting the local clock based on last shutdown time"
swclock --warn if ! swclock 2> /dev/null; then
swclock --warn @PREFIX@/sbin/runscript
fi
eend $? eend $?
} }