aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/base-files/lib/upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/oxnas/base-files/lib/upgrade')
-rw-r--r--target/linux/oxnas/base-files/lib/upgrade/platform.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/oxnas/base-files/lib/upgrade/platform.sh b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
new file mode 100644
index 0000000..006dd0d
--- /dev/null
+++ b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+
+. /lib/oxnas.sh
+
+RAMFS_COPY_DATA=/lib/oxnas.sh
+
+platform_check_image() {
+ local board=$(oxnas_board_name)
+
+ [ "$ARGC" -gt 1 ] && return 1
+
+ nand_do_platform_check $board $1
+ return $?
+}
+
+platform_pre_upgrade() {
+ nand_do_upgrade $1
+}
+
+disable_watchdog() {
+ killall watchdog
+ ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
+ echo 'Could not disable watchdog'
+ return 1
+ }
+}
+
+append sysupgrade_pre_upgrade disable_watchdog