summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-07-27 16:53:50 -0400
committerScott Moser <smoser@ubuntu.com>2015-07-27 16:53:50 -0400
commit81a9f17a71f9cac4c78ea5ce80b4a96e3bbb9324 (patch)
treeed9b2fe43f65d2e8fc705020d7cdd4c6307b8988 /udev
parent22cb92421234c31b783ed9df01439c734535ba01 (diff)
parentd68b340f8a6abf40f4d5cb546c91122c8856aa83 (diff)
downloadvyos-cloud-init-81a9f17a71f9cac4c78ea5ce80b4a96e3bbb9324.tar.gz
vyos-cloud-init-81a9f17a71f9cac4c78ea5ce80b4a96e3bbb9324.zip
merge from trunk
Diffstat (limited to 'udev')
-rw-r--r--udev/66-azure-ephemeral.rules18
1 files changed, 18 insertions, 0 deletions
diff --git a/udev/66-azure-ephemeral.rules b/udev/66-azure-ephemeral.rules
new file mode 100644
index 00000000..b9c5c3ef
--- /dev/null
+++ b/udev/66-azure-ephemeral.rules
@@ -0,0 +1,18 @@
+# Azure specific rules
+ACTION!="add|change", GOTO="cloud_init_end"
+SUBSYSTEM!="block", GOTO="cloud_init_end"
+ATTRS{ID_VENDOR}!="Msft", GOTO="cloud_init_end"
+ATTRS{ID_MODEL}!="Virtual_Disk", GOTO="cloud_init_end"
+
+# Root has a GUID of 0000 as the second value
+# The resource/resource has GUID of 0001 as the second value
+ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="azure_root", GOTO="ci_azure_names"
+ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="azure_resource", GOTO="ci_azure_names"
+GOTO="cloud_init_end"
+
+# Create the symlinks
+LABEL="ci_azure_names"
+ENV{DEVTYPE}=="disk", SYMLINK+="disk/cloud/$env{fabric_name}"
+ENV{DEVTYPE}=="partition", SYMLINK+="disk/cloud/$env{fabric_name}-part%n"
+
+LABEL="cloud_init_end"