aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/base-files/lib/upgrade/platform.sh
blob: 006dd0d134612eaec16655993b26740da3444871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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