uvol: call umount instead of using 'block umount'
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>
This commit is contained in:
parent
d27ecdcc49
commit
e17a931c49
2 changed files with 3 additions and 3 deletions
|
@ -202,7 +202,7 @@ disactivatevol() {
|
||||||
*)
|
*)
|
||||||
[ "$lv_active" = "active" ] || return 0
|
[ "$lv_active" = "active" ] || return 0
|
||||||
devname="$(getdev "$1")"
|
devname="$(getdev "$1")"
|
||||||
[ "$devname" ] && /sbin/block umount "$devname"
|
[ "$devname" ] && umount "/dev/$devname"
|
||||||
lvm_cmd lvchange -a n "$lv_full_name"
|
lvm_cmd lvchange -a n "$lv_full_name"
|
||||||
lvm_cmd lvchange -k y "$lv_full_name" || return $?
|
lvm_cmd lvchange -k y "$lv_full_name" || return $?
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -168,12 +168,12 @@ disactivatevol() {
|
||||||
vol_is_mode "$voldev" wo && return 22
|
vol_is_mode "$voldev" wo && return 22
|
||||||
vol_is_mode "$voldev" wp && return 16
|
vol_is_mode "$voldev" wp && return 16
|
||||||
if vol_is_mode "$voldev" ro; then
|
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"
|
ubiblock --remove "/dev/$voldev"
|
||||||
ubirename "/dev/$ubidev" "uvol-ro-$1" "uvol-rd-$1" || return $?
|
ubirename "/dev/$ubidev" "uvol-ro-$1" "uvol-rd-$1" || return $?
|
||||||
return 0
|
return 0
|
||||||
elif vol_is_mode "$voldev" rw; then
|
elif vol_is_mode "$voldev" rw; then
|
||||||
/sbin/block umount "$voldev"
|
umount "/dev/$voldev"
|
||||||
ubirename "/dev/$ubidev" "uvol-rw-$1" "uvol-wd-$1" || return $?
|
ubirename "/dev/$ubidev" "uvol-rw-$1" "uvol-wd-$1" || return $?
|
||||||
block_hotplug remove "$voldev"
|
block_hotplug remove "$voldev"
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue