equal
deleted
inserted
replaced
29 |
29 |
30 # exclude the device (stick) we're part of - this HACK is |
30 # exclude the device (stick) we're part of - this HACK is |
31 # only useful on KVM - the usb stick doesn't appear as a removeable |
31 # only useful on KVM - the usb stick doesn't appear as a removeable |
32 # device |
32 # device |
33 next |
33 next |
34 if (stat $0)[0] ~~ [map { (stat)[6] } |
34 if (stat $0)[0] ~~ [ |
35 map { "/dev/" . basename(dirname $_) } glob("$_/*/partition")]; |
35 map { (stat)[6] } |
|
36 map { "/dev/" . basename(dirname $_) } glob("$_/*/partition") |
|
37 ]; |
36 |
38 |
37 verbose("\n"); |
39 verbose("\n"); |
38 verbose("device $dev\n"); |
40 verbose("device $dev\n"); |
39 |
41 |
40 die "ERR: $dev does not exist. (should not happen): $!" |
42 die "ERR: $dev does not exist. (should not happen): $!" |
55 /^(\S+)\s*:.*Id=\s*([[:xdigit:]]+)/ or next; |
57 /^(\S+)\s*:.*Id=\s*([[:xdigit:]]+)/ or next; |
56 $devs->{volume}{$1} = { |
58 $devs->{volume}{$1} = { |
57 origin => "ptable", |
59 origin => "ptable", |
58 ptable_type => $2, |
60 ptable_type => $2, |
59 }; |
61 }; |
60 push @{$devs->{volumes}}, $1; |
62 push @{ $devs->{volumes} }, $1; |
61 } |
63 } |
62 } |
64 } |
63 |
65 |
64 return; |
66 return; |
65 } |
67 } |