apply_bootconfig() { . /lib/functions.sh case $(board_name) in zyxel,nwa50ax|\ zyxel,nwa55axe) mtd_idx=$(find_mtd_index "bootconfig") zyxel-bootconfig "/dev/mtd$mtd_idx" set-image-status 0 valid zyxel-bootconfig "/dev/mtd$mtd_idx" set-active-image 0 ;; esac } [ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main apply_bootconfig