summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/upgrade/nand.sh
diff options
context:
space:
mode:
authorRodrigo Balerdi <lanchon@gmail.com>2022-04-15 10:15:02 -0300
committerDaniel Golle <daniel@makrotopia.org>2022-04-19 16:28:25 +0100
commit9a2f08f6e704d733fea88b6b511f2fa06b8039f4 (patch)
treed16f87e249e8ee3c14ff8c39877bf97e606a518f /package/base-files/files/lib/upgrade/nand.sh
parentbfd9afc38dc8a5e158aea11f89c43980396cceff (diff)
downloadopenwrt-9a2f08f6e704d733fea88b6b511f2fa06b8039f4.tar.gz
openwrt-9a2f08f6e704d733fea88b6b511f2fa06b8039f4.tar.bz2
openwrt-9a2f08f6e704d733fea88b6b511f2fa06b8039f4.zip
base-files: trim unnecessary nand sysupgrade code
Remove unnecessary sync commands during nand sysupgrade. Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Diffstat (limited to 'package/base-files/files/lib/upgrade/nand.sh')
-rw-r--r--package/base-files/files/lib/upgrade/nand.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index d85b2aa241..371bdf7d77 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -158,13 +158,11 @@ nand_upgrade_prepare_ubi() {
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
if [ ! "$ubidev" ]; then
ubiattach -m "$mtdnum"
- sync
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
if [ ! "$ubidev" ]; then
ubiformat /dev/mtd$mtdnum -y
ubiattach -m "$mtdnum"
- sync
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
if [ ! "$ubidev" ]; then
@@ -229,7 +227,7 @@ nand_upgrade_prepare_ubi() {
fi
fi
fi
- sync
+
return 0
}
@@ -255,7 +253,6 @@ nand_upgrade_ubinized() {
local mtddev="/dev/mtd${mtdnum}"
ubidetach -p "${mtddev}" || :
- sync
ubiformat "${mtddev}" -y -f "${ubi_file}"
ubiattach -p "${mtddev}"