diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2011-02-20 17:58:42 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2011-02-20 17:58:42 -0500 |
commit | f40b9c0c67197fbc7ceb39623487c4cc1794d270 (patch) | |
tree | 842dd04c81ba2269c2b81b30ed8cbda65bdca26e | |
parent | 3348188b6da4fcf2fbc76a564a579ae30df2ba0e (diff) | |
download | kvm-manager-f40b9c0c67197fbc7ceb39623487c4cc1794d270.tar.gz kvm-manager-f40b9c0c67197fbc7ceb39623487c4cc1794d270.tar.bz2 |
trigger udev updates on lvm devices
-rwxr-xr-x | kvm-manager | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kvm-manager b/kvm-manager index 8b96f0e..9f445ec 100755 --- a/kvm-manager +++ b/kvm-manager @@ -47,6 +47,13 @@ up() { BOOTCHOICE=d fi + for disk in "$HDA" "$HDB" "HDC" "HDD"; do + if printf "%s" "$disk" | grep '^/dev/mapper/'; then + mappername=$(printf "%s" "$disk" | sed 's!^/dev/mapper/!!') + udevadm trigger --subsystem-match=block --attr-match=dm/name="$mappername" + fi + done + # set up the disks, if needed: [ -z "$HDA" ] || KVMARGS="$KVMARGS -drive file=$HDA,if=virtio,id=hda,boot=on,format=raw" [ -z "$HDB" ] || KVMARGS="$KVMARGS -drive file=$HDB,if=virtio,id=hdb,format=raw" |