summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Holer <vlastimil.holer@gmail.com>2013-01-07 12:27:06 -0500
committerScott Moser <smoser@ubuntu.com>2013-01-07 12:27:06 -0500
commitbf7bdf27e109ffb4964d4869b79da964fc40fb65 (patch)
treefc9e8b2d11e02c223803d431a150dc7e8dc685c2
parent4fde399a38765fa9641b3177b966ad6c8ec9750f (diff)
parente53ab8f17d2aa8d6826581eee20202812b0620e9 (diff)
downloadvyos-cloud-init-bf7bdf27e109ffb4964d4869b79da964fc40fb65.tar.gz
vyos-cloud-init-bf7bdf27e109ffb4964d4869b79da964fc40fb65.zip
Allow 'sr0' to be specified as a device for mounts
Previously cloud-config to get a '/dev/sr0' entry written to /etc/fstab would have had to have the full /dev/sr0. This change allows cloud-config to reference it without the '/dev/' prefix. Like: | mounts: | - [ sr0, /media/sr0 ]
-rw-r--r--ChangeLog2
-rw-r--r--cloudinit/config/cc_mounts.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 18e25725..544032a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,8 @@
- fix redaction of password field in log (LP: #1096417)
- fix to cloud-config user setup. Previously, lock_passwd was broken and
all accounts would be locked unless 'system' was given (LP: #1096423).
+ - Allow 'sr0' (or sr[0-9]) to be specified without /dev/ as a source for
+ mounts. [Vlastimil Holer]
0.7.1:
- sysvinit: fix missing dependency in cloud-init job for RHEL 5.6
- config-drive: map hostname to local-hostname (LP: #1061964)
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
index cb772c86..9010d97f 100644
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -24,8 +24,8 @@ import re
from cloudinit import util
-# Shortname matches 'sda', 'sda1', 'xvda', 'hda', 'sdb', xvdb, vda, vdd1
-SHORTNAME_FILTER = r"^[x]{0,1}[shv]d[a-z][0-9]*$"
+# Shortname matches 'sda', 'sda1', 'xvda', 'hda', 'sdb', xvdb, vda, vdd1, sr0
+SHORTNAME_FILTER = r"^([x]{0,1}[shv]d[a-z][0-9]*|sr[0-9]+)$"
SHORTNAME = re.compile(SHORTNAME_FILTER)
WS = re.compile("[%s]+" % (whitespace))
FSTAB_PATH = "/etc/fstab"