From bf3474c762f79ad0aa93e0f0b2ae6ced6070fa4b Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 26 Oct 2012 12:19:47 +1300 Subject: [PATCH] Support KVM instances - allow /dev/vda to be detected as a disk. --- scripts/d/init-func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/d/init-func b/scripts/d/init-func index 7491767d..e9e4c292 100755 --- a/scripts/d/init-func +++ b/scripts/d/init-func @@ -57,7 +57,7 @@ function prepend_dev() { function whole_disk_name() { local dev=`prepend_dev "$1"` case "$dev" in - /dev/sd*|/dev/hd*) + /dev/sd*|/dev/hd*|/dev/vd*) echo "$dev" | sed -e 's/[0-9]*$//' ;; /dev/cciss/*) @@ -74,7 +74,7 @@ function partition_name() { local dev=`prepend_dev "$1"` local part=$2 case "$dev" in - /dev/sd*|/dev/hd*) + /dev/sd*|/dev/hd*|/dev/vd*) echo "${dev}${part}" ;; /dev/cciss/*)