aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-07-28 09:12:35 -0500
committerWilliam Hubbs <williamh@gentoo.org>2011-07-28 09:21:29 -0500
commit3688c851636c9458eb88c7469bb374e5f6d0f9de (patch)
treea3c230aed1bff476d441e3210eb734601864038c
parent370e5c775a5072583bc57708bbf2c9e0320b8cd8 (diff)
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
-rw-r--r--init.d/swclock.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.d/swclock.in b/init.d/swclock.in
index 75f1c79f..077f258d 100644
--- a/init.d/swclock.in
+++ b/init.d/swclock.in
@@ -16,7 +16,9 @@ depend()
start()
{
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 $?
}