From ec81125943b04b5e1906536dcbbb52b8da7f3fc7 Mon Sep 17 00:00:00 2001 From: Stephen Lowrie Date: Fri, 19 Jul 2019 15:25:07 -0500 Subject: [PATCH] dracut/30ignition: support `coreos.no_persist_ip` When `coreos.no_persist_ip` is not specified in a true value persist ifcfg files created by the `write-ifcfg.sh` script run as part of the dracut `45ifcfg` module to the real root. --- dracut/30ignition/module-setup.sh | 2 ++ dracut/30ignition/persist-ifcfg.sh | 30 ++++++++++++++++++++++++++++++ grub/02_ignition_firstboot | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 dracut/30ignition/persist-ifcfg.sh diff --git a/dracut/30ignition/module-setup.sh b/dracut/30ignition/module-setup.sh index 61726d1..a46f718 100755 --- a/dracut/30ignition/module-setup.sh +++ b/dracut/30ignition/module-setup.sh @@ -68,6 +68,8 @@ install() { # needed for openstack config drive support inst_rules 60-cdrom_id.rules + + inst_hook pre-pivot 90 "$moddir/persist-ifcfg.sh" } has_fw_cfg_module() { diff --git a/dracut/30ignition/persist-ifcfg.sh b/dracut/30ignition/persist-ifcfg.sh new file mode 100644 index 0000000..e961932 --- /dev/null +++ b/dracut/30ignition/persist-ifcfg.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +set -e + +cmdline=( $(