summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_growpart.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py
index 2d54aabf..0dd92a46 100644
--- a/cloudinit/config/cc_growpart.py
+++ b/cloudinit/config/cc_growpart.py
@@ -32,6 +32,7 @@ frequency = PER_ALWAYS
DEFAULT_CONFIG = {
'mode': 'auto',
'devices': ['/'],
+ 'ignore_growroot_disabled': False,
}
@@ -251,6 +252,12 @@ def handle(_name, cfg, _cloud, log, _args):
log.debug("growpart disabled: mode=%s" % mode)
return
+ if util.is_false(mycfg.get('ignore_growroot_disabled', False)):
+ if os.path.isfile("/etc/growroot-disabled"):
+ log.debug("growpart disabled: /etc/growroot-disabled exists")
+ log.debug("use ignore_growroot_disabled to ignore")
+ return
+
devices = util.get_cfg_option_list(cfg, "devices", ["/"])
if not len(devices):
log.debug("growpart: empty device list")