git://git.onelab.eu
/
bootcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf5a7e6
)
Handle /dev/rtc name change for newer kernels
author
S.Çağlar Onur
<caglar@verivue.com>
Mon, 21 Feb 2011 19:05:28 +0000
(14:05 -0500)
committer
S.Çağlar Onur
<caglar@verivue.com>
Mon, 21 Feb 2011 19:08:16 +0000
(14:08 -0500)
initscripts/pl_sysinit
patch
|
blob
|
history
diff --git
a/initscripts/pl_sysinit
b/initscripts/pl_sysinit
index
136c254
..
7bfb061
100755
(executable)
--- a/
initscripts/pl_sysinit
+++ b/
initscripts/pl_sysinit
@@
-147,5
+147,22
@@
echo $(date "+%H:%M:%S") "pl_sysinit: bringing network online"
echo ""
echo $(date "+%H:%M:%S") "pl_sysinit: attempting to sync clock"
/usr/sbin/ntpdate -b -t 10 -u pool.ntp.org
echo ""
echo $(date "+%H:%M:%S") "pl_sysinit: attempting to sync clock"
/usr/sbin/ntpdate -b -t 10 -u pool.ntp.org
+
+# Handle /dev/rtc name change for newer kernels
+# otherwise hwclock fails
+baseMaj=`uname -r | cut -d "." -f1`
+baseMin=`uname -r | cut -d "." -f2`
+vers=`uname -r | cut -d "." -f3 | cut -d "-" -f1`
+if [ $baseMaj -eq 2 ];then
+ if [ $baseMin -eq 6 ]; then
+ if [ $vers -ge 32 ];then
+ if [ "$(readlink /dev/rtc)" != "/dev/rtc0" ]; then
+ rm -f /dev/rtc
+ ln -s /dev/rtc0 /dev/rtc
+ fi
+ fi
+ fi
+fi
+
# save ntp clock to hardware
/sbin/hwclock --systohc --utc
# save ntp clock to hardware
/sbin/hwclock --systohc --utc