X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=initscripts%2Fpl_sysinit;h=389f8b6915c7cb0d507d46ad263c864785a9bf3d;hb=0597762b242c534572d27be7b895304923b4cc82;hp=4f5d2acb7836ce32de8e84e3f5e35c2048a4a01b;hpb=b5b7d860157f6458aca2d69a30092ecd7fc5a616;p=bootcd.git diff --git a/initscripts/pl_sysinit b/initscripts/pl_sysinit index 4f5d2ac..389f8b6 100755 --- a/initscripts/pl_sysinit +++ b/initscripts/pl_sysinit @@ -1,5 +1,14 @@ #!/bin/sh +### xxx tmp debug + +set -x +echo pl_sysinit on console > /dev/console +exec 2>&1 +exec > /dev/console +echo pl_sysinit plain + +### . /etc/init.d/pl_functions echo "" @@ -156,5 +165,22 @@ pl_network_sanity_checks 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