summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarm Weites <harm@weites.com>2013-12-14 19:14:18 +0000
committerHarm Weites <harm@weites.com>2013-12-14 19:14:18 +0000
commitbd96af406f268e3fe41537125be4cf2dfc9ea5bc (patch)
treef7a7d7d25f6e374718e303ca64b1414a756bb453
parent43b88392a14f6ab9395313353e28e60acc85ab75 (diff)
downloadvyos-cloud-init-bd96af406f268e3fe41537125be4cf2dfc9ea5bc.tar.gz
vyos-cloud-init-bd96af406f268e3fe41537125be4cf2dfc9ea5bc.zip
new: Touch a reboot-required file to make clear we want a reboot after
resizing the partition.
-rw-r--r--cloudinit/config/cc_growpart.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py
index 07556f03..29d8b49b 100644
--- a/cloudinit/config/cc_growpart.py
+++ b/cloudinit/config/cc_growpart.py
@@ -165,6 +165,10 @@ class ResizeGpart(object):
util.logexc(LOG, "Failed: gpart resize -i %s %s", partnum, diskdev)
raise ResizeFailedException(e)
+ # Since growing the FS requires a reboot, make sure we reboot
+ # first when this module has finished.
+ open('/var/run/reboot-required', 'a').close()
+
return (before, get_size(partdev))
def get_size(filename):