From efcc100ef0d6953f60c0eaf46fee3239070bcc91 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 25 Jan 2024 03:06:45 +0000 Subject: [PATCH] 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 --- package/base-files/files/lib/upgrade/nand.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2