Calling 'block umount' results in *all* devices listed in
/etc/config/fstab being unmounted.
Just call 'umount /dev/$devname' directly instead as that has the
desired effect.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
*)
[ "$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
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