mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
69903c3ee6
Now that we generate images with metadata attached, require it in order to prevent accidentally flashing the wrong image to a board. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
32 lines
490 B
Bash
32 lines
490 B
Bash
#
|
|
# Copyright (C) 2014 OpenWrt.org
|
|
#
|
|
|
|
. /lib/oxnas.sh
|
|
|
|
RAMFS_COPY_DATA=/lib/oxnas.sh
|
|
REQUIRE_IMAGE_METADATA=1
|
|
|
|
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
|