X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=initscripts%2Fpl_sysinit;h=388010bf4e937e1a2e6908cec6a86115f7ccb0cc;hb=4b85e30580433a5d81c692170de638e09bd4cc22;hp=136c25491f2ce5279c06333aada6d2d2e0cdfa52;hpb=cd117bef7e4055f7f34add071629d2bd54b89363;p=bootcd.git diff --git a/initscripts/pl_sysinit b/initscripts/pl_sysinit index 136c254..388010b 100755 --- a/initscripts/pl_sysinit +++ b/initscripts/pl_sysinit @@ -1,5 +1,15 @@ #!/bin/sh +### xxx tmp debug + +set -x +echo pl_sysinit on console > /dev/console +exec > /dev/console +echo pl_sysinit plain + +### +. /etc/init.d/pl_functions + echo "" echo "PlanetLab BootCD - distro @PLDISTRO@ based on @FCDISTRO@" @@ -140,12 +150,36 @@ echo "" echo $(date "+%H:%M:%S") "pl_sysinit: configuring kernel parameters" /sbin/sysctl -e -p /etc/sysctl.conf +# startup rsyslog if available (we're *NOT* running the standard rc) +syslog=/etc/rc.d/init.d/rsyslog +[ -x $syslog ] && $syslog start + 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