aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/avr32/base-files/lib/upgrade/.svn/text-base
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/avr32/base-files/lib/upgrade/.svn/text-base')
-rw-r--r--target/linux/avr32/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/avr32/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base b/target/linux/avr32/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base
new file mode 100644
index 0000000..00ad863
--- /dev/null
+++ b/target/linux/avr32/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+
+PART_NAME=firmware
+
+platform_check_image() {
+ local magic="$(get_magic_long "$1")"
+
+ [ "$ARGC" -gt 1 ] && return 1
+
+ [ "$magic" != "27051956" ] && {
+ echo "Invalid image type."
+ return 1
+ }
+
+ return 0
+}
+
+disable_watchdog() {
+ killall watchdog
+ ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
+ echo 'Could not disable watchdog'
+ return 1
+ }
+}
+
+append sysupgrade_pre_upgrade disable_watchdog