platform.sh 465 B

123456789101112131415161718192021222324252627282930
  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_pre_upgrade() {
  13. nand_do_upgrade $1
  14. }
  15. disable_watchdog() {
  16. killall watchdog
  17. ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
  18. echo 'Could not disable watchdog'
  19. return 1
  20. }
  21. }
  22. append sysupgrade_pre_upgrade disable_watchdog