diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-11-09 20:06:05 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-11-09 20:06:05 -0500 |
commit | 0e0e590b60ad3f5d1ef66ef7f7df271c4bc09c7f (patch) | |
tree | f7714238b8c942a57ef323a4dfbc302eb8dd6ccb | |
parent | 74fe2d2c661d70e5ec93ebde036d927c0f9ed15c (diff) | |
parent | f1db8eaa68dadaae6a591339f69994e3afb589c3 (diff) | |
download | vyos-cloud-init-0e0e590b60ad3f5d1ef66ef7f7df271c4bc09c7f.tar.gz vyos-cloud-init-0e0e590b60ad3f5d1ef66ef7f7df271c4bc09c7f.zip |
cc_mounts: use 'nofail' if system uses systemd. (LP: #1514485)
'nofail' is the systemd equivalent of the mountall/upstart 'nobootwait'.
So, if a system uses systemd, then use 'nofail' in /etc/fstab for
ephemeral mounts.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | cloudinit/config/cc_mounts.py | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -67,6 +67,7 @@ - AltCloud: fix call to udevadm settle (LP: #1507526) - Ubuntu templates: modify sources.list template to provide same sources as install from server or desktop ISO. (LP: #1177432) + - cc_mounts: use 'nofail' if system uses systemd. (LP: #1514485) 0.7.6: - open 0.7.6 - Enable vendordata on CloudSigma datasource (LP: #1303986) diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py index 47b63dfc..11089d8d 100644 --- a/cloudinit/config/cc_mounts.py +++ b/cloudinit/config/cc_mounts.py @@ -263,7 +263,11 @@ def handle_swapcfg(swapcfg): def handle(_name, cfg, cloud, log, _args): # fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno - defvals = [None, None, "auto", "defaults,nobootwait", "0", "2"] + def_mnt_opts = "defaults,nobootwait" + if cloud.distro.uses_systemd(): + def_mnt_opts = "defaults,nofail" + + defvals = [None, None, "auto", def_mnt_opts, "0", "2"] defvals = cfg.get("mount_default_fields", defvals) # these are our default set of mounts |