X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=initscripts%2Fpl_sysinit;h=8b3d4216d3be4567f68382126f38e46322c37ad0;hb=156b69f9dc037be1df29e0f164d8b534f488771b;hp=aa5bb52646928250b17922c7184354cfc02b4ced;hpb=d33b583f3d843e1dc10e46c28597e3bf996275ca;p=bootcd.git diff --git a/initscripts/pl_sysinit b/initscripts/pl_sysinit index aa5bb52..8b3d421 100755 --- a/initscripts/pl_sysinit +++ b/initscripts/pl_sysinit @@ -1,5 +1,7 @@ #!/bin/sh +. /etc/init.d/pl_functions + echo "" echo "PlanetLab BootCD - distro @PLDISTRO@ based on @FCDISTRO@" @@ -148,8 +150,28 @@ echo "" echo $(date "+%H:%M:%S") "pl_sysinit: bringing network online" /etc/init.d/pl_netinit +# just in case, sometimes we're seeing weird stuff already at this point +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