From: Daniel Golle Date: Thu, 25 Jan 2024 03:06:45 +0000 (+0000) Subject: base-files: upgrade: nand.sh: mute umount error X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;ds=sidebyside;h=efcc100ef0d6953f60c0eaf46fee3239070bcc91;p=openwrt%2Fopenwrt.git base-files: upgrade: nand.sh: mute umount error Send error output of umount to /dev/null to mute error in case ubiblock device has already been unmounted (which is usually the case). Gets rid of bogus error message: umount: can't unmount /dev/ubiblock0_4: Invalid argument Signed-off-by: Daniel Golle --- diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index d910bf1791..0a6fd8432d 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -111,7 +111,7 @@ nand_remove_ubiblock() { local ubiblk="ubiblock${ubivol:3}" if [ -e "/dev/$ubiblk" ]; then - umount "/dev/$ubiblk" && echo "unmounted /dev/$ubiblk" || : + umount "/dev/$ubiblk" 2>/dev/null && echo "unmounted /dev/$ubiblk" || : if ! ubiblock -r "/dev/$ubivol"; then echo "cannot remove $ubiblk" return 1