mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Only sed in growpart workaround when release is >= jessie
This script is only needed/created on jessie or later distros. Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
This commit is contained in:
parent
673d2a520d
commit
433cbf2ae4
1 changed files with 3 additions and 1 deletions
|
@ -58,6 +58,7 @@ class AdjustExpandRootScript(Task):
|
|||
@classmethod
|
||||
def run(cls, info):
|
||||
from ..tools import sed_i
|
||||
from bootstrapvz.common.releases import jessie
|
||||
script = os.path.join(info.root, 'etc/init.d/expand-root')
|
||||
|
||||
root_idx = info.volume.partition_map.root.get_index()
|
||||
|
@ -67,4 +68,5 @@ class AdjustExpandRootScript(Task):
|
|||
root_device_path = 'root_device_path="{device}"'.format(device=info.volume.device_path)
|
||||
sed_i(script, '^root_device_path="/dev/xvda"$', root_device_path)
|
||||
|
||||
sed_i(script, '^growpart="growpart"$', 'growpart-workaround')
|
||||
if info.manifest.release >= jessie:
|
||||
sed_i(script, '^growpart="growpart"$', 'growpart-workaround')
|
||||
|
|
Loading…
Add table
Reference in a new issue