~oddbloke/cloud-init/lp1506187

« back to all changes in this revision

Viewing changes to udev/66-azure-ephemeral.rules

  • Committer: Daniel Watkins
  • Date: 2015-07-21 12:06:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1127.
  • Revision ID: daniel.watkins@canonical.com-20150721120611-dk6jtev77nl1ksrb
Add udev rules for Azure ephemeral disks.

And install them in the Debian packaging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Azure specific rules
 
2
ACTION!="add|change", GOTO="cloud_init_end"
 
3
SUBSYSTEM!="block", GOTO="cloud_init_end"
 
4
ATTRS{ID_VENDOR}!="Msft", GOTO="cloud_init_end"
 
5
ATTRS{ID_MODEL}!="Virtual_Disk", GOTO="cloud_init_end"
 
6
 
 
7
# Root has a GUID of 0000 as the second value
 
8
# The resource/resource has GUID of 0001 as the second value
 
9
ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="azure_root", GOTO="ci_azure_names"
 
10
ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="azure_resource", GOTO="ci_azure_names"
 
11
GOTO="cloud_init_end"
 
12
 
 
13
# Create the symlinks
 
14
LABEL="ci_azure_names"
 
15
ENV{DEVTYPE}=="disk", SYMLINK+="disk/cloud/$env{fabric_name}"
 
16
ENV{DEVTYPE}=="partition", SYMLINK+="disk/cloud/$env{fabric_name}-part%n"
 
17
 
 
18
LABEL="cloud_init_end"