Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/
Date: Thu, 28 Jul 2011 14:32:06
Message-Id: 3688c851636c9458eb88c7469bb374e5f6d0f9de.WilliamH@gentoo
1 commit: 3688c851636c9458eb88c7469bb374e5f6d0f9de
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 28 14:12:35 2011 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 28 14:21:29 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=3688c851
7
8 swclock: select a default reference file
9
10 If $RC_SVCDIR/shutdowntime does not exist, we need a default reference
11 file. It is safe to use @PREFIX@/sbin/runscript for this purpose.
12
13 Reported-By: Robin H. Johnson <robbat2 <AT> gentoo.org>
14 X-Gentoo-Bug: 376249
15 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=376249
16
17 ---
18 init.d/swclock.in | 4 +++-
19 1 files changed, 3 insertions(+), 1 deletions(-)
20
21 diff --git a/init.d/swclock.in b/init.d/swclock.in
22 index 75f1c79..077f258 100644
23 --- a/init.d/swclock.in
24 +++ b/init.d/swclock.in
25 @@ -16,7 +16,9 @@ depend()
26 start()
27 {
28 ebegin "Setting the local clock based on last shutdown time"
29 - swclock --warn
30 + if ! swclock 2> /dev/null; then
31 + swclock --warn @PREFIX@/sbin/runscript
32 + fi
33 eend $?
34 }