Browse Source

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 <[email protected]>
Daniel Golle 1 year ago
parent
commit
efcc100ef0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      package/base-files/files/lib/upgrade/nand.sh

+ 1 - 1
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