Can't decrease system time

    • Can't decrease system time

      Hi,

      I've tried to change system time of DM7020HD with command "date"
      First of all, I turned off option "Use transponder time" and reboot receiver.
      When I increase system time (etc 21:00 -> 21:05), time have been successfully changed
      But when I've tried do decrease it (etc 21:10 -> 21:00), time haven't been changed

      Is it bug or "feature" ?
      ?(
    • Yes, I now time travelling restrictions, but question about system clock in dreambox :D

      Same thing with using utils for time synchronisation rdate or ntpdate
      If new time from ntp/rdate server more that current dreambox time, synchronisation is ok.
      If new time less, any utils cannot set it.

      Any idea ? :winke:
    • another, connected, problem is dm7080 starting from power off with 1900/1/1 00:00:00
      and cron starts to execute rules which were set for saturday's night

      tried solve by add
      [ -x /etc/init.d/rdate ] && /etc/init.d/rdate start
      into /etc/init.d/cron
      but that didn't helped

      after power off only restart helps to solve system time / cron problem

      yes, transponder time is turned off
      dm7080sstt; 2x dm8000sstt; dm7020s <- Diseq1x4 <- 3x Diseq1x10 <-
      Dishes:
      1.8m 36E;28E;23E;19E;16E;13E;7E
      1.6m 42E;36E
      1.0m 10/9E;5E;1W;8W
      1.0m 15W;22W;30W
      1.1m 4/5W;12W;18W;24W
      1.1m 53E;60E
      1.0m 75E
      TVs: Philips 46pfl9707s; Philips 42pfl9703h
    • added
      [ -x /usr/sbin/rdate ] && date>>/tmp/rdate.cron; /usr/sbin/rdate -s time.fu-berlin.de; date>>/tmp/rdate.cron

      result is

      after power off / on
      root@dm7080:~# cat /tmp/rdate.cron
      Thu Jan 1 02:00:06 EET 1970
      Thu Jan 1 02:00:06 EET 1970
      root@dm7080:~#

      after reboot from gui
      root@dm7080:~# cat /tmp/rdate.cron
      Tue Nov 1 19:31:44 EET 2016
      Tue Nov 1 19:31:44 EET 2016
      root@dm7080:~#
      dm7080sstt; 2x dm8000sstt; dm7020s <- Diseq1x4 <- 3x Diseq1x10 <-
      Dishes:
      1.8m 36E;28E;23E;19E;16E;13E;7E
      1.6m 42E;36E
      1.0m 10/9E;5E;1W;8W
      1.0m 15W;22W;30W
      1.1m 4/5W;12W;18W;24W
      1.1m 53E;60E
      1.0m 75E
      TVs: Philips 46pfl9707s; Philips 42pfl9703h
    • mit deiner Variante wird nur der E2 Start um den Wert $(sleep 30) verzögert, weil mit deinem command nur der rdate Befehl im Hintergrund ausgeführt wird, aber nicht der sleep command ...

      Alternativ:
      $(sleep 30; /usr/sbin/rdate ....) &

      besser in eine Funktion packen und die Funktion dann im Hintergrund aufrufen, weil flexibler. und der E2 start wird nicht verzögert
      timesync.sh

      Shell-Script

      1. #/bin/sh
      2. set_time () {
      3. sleep 30
      4. [ -x /usr/sbin/rdate ] && date>>/tmp/rdate.cron; /usr/sbin/rdate -s time.fu-berlin.de; date>>/tmp/rdate.cron
      5. }
      6. set_time &
      7. exit 0
      und dann timesync.sh per cron aufrufen
      @reboot /usr/script/timesync.sh

      Es gibt auch noch andere Varianten

      ich glaube aber nicht, dass es etwas bringt
      Gruß Fred

      Die Dreambox ist tot, es lebe die Dreambox

      ¯\_(ツ)_/¯

      Quellcode

      1. root@dm920:~$ mount | grep "/ "
      2. /dev/mmcblk1p1 on / type ext4 (rw,relatime,data=ordered)
      3. root@dm920:~$

      Dieser Beitrag wurde bereits 5 mal editiert, zuletzt von Fred Bogus Trumper ()

    • @Fred Bogus Trumper
      thanks for help !
      there is solved /etc/init.d/cron

      Quellcode

      1. #! /bin/sh
      2. #
      3. # This is an init script for openembedded
      4. # Copy it to /etc/init.d/cron and type
      5. # > update-rc.d cron defaults 60
      6. #
      7. # newnigma2 hack fix me
      8. mkdir -p /cron
      9. rm -rf /var/cron
      10. ln -sf /cron /var/cron
      11. cron=/usr/sbin/cron
      12. test -x "$cron" || exit 0
      13. # 2016.11.02 MartiniB fix, start cron only after system time is set
      14. if [ "$1" = "start" ] && [ `date +%Y%m%d` -eq 19700101 ] && [ -x /etc/init.d/rdate ]; then
      15. wait_system_time () {
      16. while [ `date +%Y%m%d` -eq 19700101 ]; do
      17. sleep 10
      18. /etc/init.d/rdate start
      19. done
      20. "$0" start
      21. }
      22. wait_system_time &
      23. exit 0
      24. fi
      25. case "$1" in
      26. start)
      27. echo -n "Starting Vixie-cron"
      28. start-stop-daemon --start --quiet --exec $cron
      29. echo "."
      30. ;;
      31. stop)
      32. echo -n "Stopping Vixie-cron"
      33. start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid
      34. echo "."
      35. ;;
      36. reload|force-reload)
      37. start-stop-daemon --stop --quiet --signal 1 --exec $cron
      38. ;;
      39. restart)
      40. echo -n "Stopping Vixie-cron"
      41. start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid
      42. echo "."
      43. sleep 1
      44. echo -n "Starting Vixie-cron"
      45. start-stop-daemon --start --quiet --exec $cron
      46. echo "."
      47. ;;
      48. *)
      49. echo "Usage: /etc/init.d/cron {start|stop|reload|restart|force-reload}"
      50. exit 1
      51. esac
      52. exit 0
      Alles anzeigen

      p.s.
      why forum engine makes that auto correcting?

      Shell-Script: /etc/init.d/cron

      1. #! / Bin / sh
      2. #
      3. # This is an init script for openembedded
      4. # Copy it to /etc/init.d/cron and type
      5. #> Update-rc.d cron defaults 60
      6. #
      7. # Newnigma2 hack fix me
      8. mkdir -p / cron
      9. rm -rf / var / cron
      10. ln -sf / cron / var / cron
      11. cron = / usr / sbin / cron
      12. test -x "$ cron" || exit 0
      13. # 11.02.2016 martinib fix, start cron only after system time is set
      14. if [ "$ 1" = "start"] && [ `date +% Y% m% d` -eq 19,700,101]; then
      15. wait_system_time () {
      16. while [ `date +% Y% m% d` -eq 19,700,101]; do
      17. sleep 10
      18. [-x /etc/init.d/rdate] && /etc/init.d/rdate Start
      19. done
      20. "$ 0" start
      21. }
      22. wait_system_time &
      23. exit 0
      24. fi
      25. case "$ 1" in
      26. start)
      27. echo -n "Starting Vixie cron"
      28. start-stop-daemon --start --quiet --exec $ cron
      29. echo "."
      30. ;;
      31. Stop)
      32. echo -n "Stopping Vixie cron"
      33. start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid
      34. echo "."
      35. ;;
      36. reload | force-reload)
      37. start-stop-daemon --stop --quiet --signal 1 --exec $ cron
      38. ;;
      39. restart)
      40. echo -n "Stopping Vixie cron"
      41. start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid
      42. echo "."
      43. sleep 1
      44. echo -n "Starting Vixie cron"
      45. start-stop-daemon --start --quiet --exec $ cron
      46. echo "."
      47. ;;
      48. *)
      49. echo "Usage: /etc/init.d/cron {start | stop | reload | restart | force-reload}"
      50. exit 1
      51. esac
      52. exit 0
      Alles anzeigen
      dm7080sstt; 2x dm8000sstt; dm7020s <- Diseq1x4 <- 3x Diseq1x10 <-
      Dishes:
      1.8m 36E;28E;23E;19E;16E;13E;7E
      1.6m 42E;36E
      1.0m 10/9E;5E;1W;8W
      1.0m 15W;22W;30W
      1.1m 4/5W;12W;18W;24W
      1.1m 53E;60E
      1.0m 75E
      TVs: Philips 46pfl9707s; Philips 42pfl9703h

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von MartiniB ()

    • you're welcome, but it was @mrvica's idea ...

      about the forum autocorrect
      I had the same issue some weeks ago, switch between BBCode and WYSIWYG editor by using the outer left square icon in the editor menubar to find out the reason
      Gruß Fred

      Die Dreambox ist tot, es lebe die Dreambox

      ¯\_(ツ)_/¯

      Quellcode

      1. root@dm920:~$ mount | grep "/ "
      2. /dev/mmcblk1p1 on / type ext4 (rw,relatime,data=ordered)
      3. root@dm920:~$

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Fred Bogus Trumper ()