public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 5292c03dde57902d170a3a7bbd3a74e6ae1acdf9
Date: Mon, 21 Jan 2013 17:55:31 +0100	[thread overview]
Message-ID: <20130121165531.84D9020210@argus.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  5292c03dde57902d170a3a7bbd3a74e6ae1acdf9 (commit)
      from  8b6f424c03c527ecfbd7445d5e7553e767d65ca9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5292c03dde57902d170a3a7bbd3a74e6ae1acdf9
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date:   Mon Jan 21 17:53:36 2013 +0100

    setclock: use last log access time if no rtc found.
    
    This prevents time backjumps that destroy graphs and vnstat data.

-----------------------------------------------------------------------

Summary of changes:
 src/initscripts/init.d/setclock | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Difference in files:
diff --git a/src/initscripts/init.d/setclock b/src/initscripts/init.d/setclock
index 6083108..86c1614 100644
--- a/src/initscripts/init.d/setclock
+++ b/src/initscripts/init.d/setclock
@@ -24,10 +24,21 @@ case ${1} in
 
 		# udev not create the rtc symlink if rtc is in the kernel
 		if [ ! -e /dev/rtc ]; then
-			ln -s rtc0 /dev/rtc
+			if [ -e /dev/rtc0 ]; then
+				ln -s rtc0 /dev/rtc
+			fi
 		fi
 
 		hwclock --hctosys ${CLOCKPARAMS} &>/dev/null
+		if [ ! ${?} == 0 ]; then
+			if [ ! -z /var/log/messages ]; then
+				boot_mesg -n "No RTC found, set time to last log accesstime ... "
+				DATE=`stat --format "%y" /var/log/messages | cut -d" " -f1`
+				TIME=`stat --format "%y" /var/log/messages | sed -e "s|\..*||g" | cut -d" " -f2`
+				date -s $DATE > /dev/null
+				date -s $TIME
+			fi
+		fi
 		evaluate_retval
 		;;
 


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2013-01-21 16:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130121165531.84D9020210@argus.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox