diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-06-17 11:13:16 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-06-17 11:13:16 -0400 |
commit | 971b5878c2699b2b48d7ab7a5e6983d90df4ce84 (patch) | |
tree | a1562fa8e9083e0a2d1ca2e3b502ce5bac06c6e0 /cloudinit/CloudConfig | |
parent | 03804622f0fa6963ddfe9fa9292b28653665365a (diff) | |
download | vyos-cloud-init-971b5878c2699b2b48d7ab7a5e6983d90df4ce84.tar.gz vyos-cloud-init-971b5878c2699b2b48d7ab7a5e6983d90df4ce84.zip |
make the default "fill in" mount entries configurable. (LP: #785542)
The primary motivation for this is so that 'nobootwait' is not hard
coded to appear in the fs_opts field.
LP: #785542
Diffstat (limited to 'cloudinit/CloudConfig')
-rw-r--r-- | cloudinit/CloudConfig/cc_mounts.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudinit/CloudConfig/cc_mounts.py b/cloudinit/CloudConfig/cc_mounts.py index 8ee4f718..592a030a 100644 --- a/cloudinit/CloudConfig/cc_mounts.py +++ b/cloudinit/CloudConfig/cc_mounts.py @@ -32,12 +32,13 @@ def is_mdname(name): return False def handle(name,cfg,cloud,log,args): - # these are our default set of mounts - defmnts = [ [ "ephemeral0", "/mnt", "auto", "defaults,nobootwait", "0", "2" ], - [ "swap", "none", "swap", "sw", "0", "0" ] ] - # fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno defvals = [ None, None, "auto", "defaults,nobootwait", "0", "2" ] + defvals = cfg.get("mount_default_fields", defvals) + + # these are our default set of mounts + defmnts = [ [ "ephemeral0", "/mnt", "auto", defvals[3], "0", "2" ], + [ "swap", "none", "swap", "sw", "0", "0" ] ] cfgmnt = [ ] if cfg.has_key("mounts"): |