11abcadf3699254e12db663bd5c8ae3dd0c2ff63
[openwrt/staging/chunkeey.git] / target / linux / ipq806x / base-files / lib / upgrade / asrock.sh
1 #!/bin/sh
2
3 . /lib/functions.sh
4
5 # It seems like ASRock tried to implement a failover firmware
6 # but the partitions are empty. Otherwise we could just share
7 # this portion with the buffalo.sh script.
8
9 asrock_upgrade_prepare_ubi() {
10 local ubidev="$( nand_find_ubi ubi )"
11
12 # Just delete these partitions if present and use
13 # OpenWrt's standard names for those.
14 ubirmvol /dev/$ubidev -N ubi_rootfs &> /dev/null || true
15 ubirmvol /dev/$ubidev -N ubi_rootfs_data &> /dev/null || true
16 }