diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8feabfe..2431ece 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog ========= +2016-06-04 +---------- +Anders Ingemann + * Disable persistent network interface names for >=stretch + 2016-06-02 ---------- Peter Wagner diff --git a/bootstrapvz/common/tasks/grub.py b/bootstrapvz/common/tasks/grub.py index 91fe34a..95c00ad 100644 --- a/bootstrapvz/common/tasks/grub.py +++ b/bootstrapvz/common/tasks/grub.py @@ -22,8 +22,13 @@ class ConfigureGrub(Task): @classmethod def run(cls, info): + from bootstrapvz.common.releases import stretch from bootstrapvz.common.tools import sed_i grub_def = os.path.join(info.root, 'etc/default/grub') + if info.manifest.release >= stretch: + # Disable "Predictable Network Interface Names" + # See issue #245 for more details + sed_i(grub_def, '^GRUB_CMDLINE_LINUX=""', 'GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"') sed_i(grub_def, '^#GRUB_TERMINAL=console', 'GRUB_TERMINAL=console') sed_i(grub_def, '^GRUB_CMDLINE_LINUX_DEFAULT="quiet"', 'GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"')