diff --git a/utils/uvol/files/lvm.sh b/utils/uvol/files/lvm.sh index 0639c10f1..c7e93f13f 100644 --- a/utils/uvol/files/lvm.sh +++ b/utils/uvol/files/lvm.sh @@ -202,7 +202,7 @@ disactivatevol() { *) [ "$lv_active" = "active" ] || return 0 devname="$(getdev "$1")" - [ "$devname" ] && /sbin/block umount "$devname" + [ "$devname" ] && umount "/dev/$devname" lvm_cmd lvchange -a n "$lv_full_name" lvm_cmd lvchange -k y "$lv_full_name" || return $? return 0 diff --git a/utils/uvol/files/ubi.sh b/utils/uvol/files/ubi.sh index d7593606f..7637fba68 100644 --- a/utils/uvol/files/ubi.sh +++ b/utils/uvol/files/ubi.sh @@ -168,12 +168,12 @@ disactivatevol() { vol_is_mode "$voldev" wo && return 22 vol_is_mode "$voldev" wp && return 16 if vol_is_mode "$voldev" ro; then - /sbin/block umount "ubiblock${voldev:3}" + grep -q "^/dev/ubiblock${voldev:3}" /proc/self/mounts && umount "/dev/ubiblock${voldev:3}" ubiblock --remove "/dev/$voldev" ubirename "/dev/$ubidev" "uvol-ro-$1" "uvol-rd-$1" || return $? return 0 elif vol_is_mode "$voldev" rw; then - /sbin/block umount "$voldev" + umount "/dev/$voldev" ubirename "/dev/$ubidev" "uvol-rw-$1" "uvol-wd-$1" || return $? block_hotplug remove "$voldev" return 0