adjtimex-1.29-r1-gentoo-utc.patch 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. --- adjtimex-1.29-debian/debian/adjtimexconfig 2011-12-23 21:29:32.962449759 +0100
  2. +++ adjtimex-1.29/debian/adjtimexconfig 2011-12-23 21:30:00.610638657 +0100
  3. @@ -3,6 +3,18 @@
  4. conffile=/etc/default/adjtimex
  5. startfile=/etc/init.d/adjtimex
  6. +# Get UTC setting
  7. +params=''
  8. +if [ -f /etc/conf.d/clock ]; then
  9. + #baselayout-1
  10. + source /etc/conf.d/clock
  11. + [ "$CLOCK" == "UTC" ] && params='--utc'
  12. +elif [ -f /etc/conf.d/hwclock ]; then
  13. + #baselayout-2
  14. + source /etc/conf.d/hwclock
  15. + [ "$clock" == "UTC" ] && params='--utc'
  16. +fi
  17. +
  18. echo -n "Comparing clocks (this will take 70 sec)..."
  19. # Get the parameters
  20. @@ -11,7 +23,7 @@
  21. baseline=`awk '/<= tick/{print ($1+$NF)/2}' /etc/adj.adjust`
  22. hz=`awk '/USER_HZ/{print $3}' /etc/adj.adjust`
  23. /usr/sbin/adjtimex --tick $baseline --frequency 0
  24. -/usr/sbin/adjtimex --adjust --force-adjust >/etc/adj.adjust
  25. +/usr/sbin/adjtimex ${params} --adjust --force-adjust >/etc/adj.adjust
  26. echo "done."
  27. ticks=`tail -n 1 /etc/adj.adjust|awk '{print $6}'`
  28. freq=`tail -n 1 /etc/adj.adjust|awk '{print $7}'`