Skip to content

Commit

Permalink
base-files: upgrade: nand.sh: mute umount error
Browse files Browse the repository at this point in the history
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 <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed Feb 1, 2024
1 parent 7b1c306 commit efcc100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/base-files/files/lib/upgrade/nand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit efcc100

Please sign in to comment.