platform.sh 581 B

1234567891011121314151617181920212223242526272829303132333435
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. . /lib/oxnas.sh
  5. RAMFS_COPY_DATA=/lib/oxnas.sh
  6. platform_check_image() {
  7. local board=$(oxnas_board_name)
  8. [ "$ARGC" -gt 1 ] && return 1
  9. nand_do_platform_check $board $1
  10. return $?
  11. }
  12. platform_do_upgrade() {
  13. if [ $$ -ne 1 ]; then
  14. echo "not PID 1, upgrade aborted."
  15. return 1;
  16. fi
  17. platform_do_upgrade_phase2 "$1" "$CONF_TAR" "$SAVE_CONFIG"
  18. }
  19. disable_watchdog() {
  20. killall watchdog
  21. ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
  22. echo 'Could not disable watchdog'
  23. return 1
  24. }
  25. }
  26. append sysupgrade_pre_upgrade disable_watchdog