summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-18 20:35:36 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-18 20:35:36 -0400
commit72b56d0f59f321519f25b039937a24b0ce338295 (patch)
tree4e86d92f11370bc1e1b502c412954134566bdb48 /udev
parent5916180c5ecb2ef74c1c993dcd32f95cb4581172 (diff)
downloadvyos-cloud-init-72b56d0f59f321519f25b039937a24b0ce338295.tar.gz
vyos-cloud-init-72b56d0f59f321519f25b039937a24b0ce338295.zip
add this, its getting moved, but i wanted some of the content stored
Diffstat (limited to 'udev')
-rw-r--r--udev/79-cloud-init-net-setup-link.rules18
1 files changed, 18 insertions, 0 deletions
diff --git a/udev/79-cloud-init-net-setup-link.rules b/udev/79-cloud-init-net-setup-link.rules
new file mode 100644
index 00000000..03dba382
--- /dev/null
+++ b/udev/79-cloud-init-net-setup-link.rules
@@ -0,0 +1,18 @@
+# cloud-init rules to apply
+
+SUBSYSTEM!="net", GOTO="cloudinit_naming_end"
+
+IMPORT{builtin}="path_id"
+
+ACTION!="add", GOTO="cloudinit_naming_end"
+
+# net_setup_link provides us with systemd names for reference
+IMPORT{builtin}="net_setup_link"
+ATTR{address}!="", ENV{MAC_ADDRESS}="$attr{address}"
+IMPORT{program}="/lib/udev/cloud-init-name-device"
+
+ENV{CLOUDINIT_NET_NAME}!="", NAME="$env{CLOUDINIT_NET_NAME}"
+
+LABEL="cloudinit_naming_end"
+
+# vi: ts=4 expandtab syntax=udevrules