Backport networking patch

This commit is contained in:
Colin Walters 2019-03-18 19:59:05 +00:00
parent 14c71e122e
commit 08c873e0e3
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From c62a108c79db49cecb9f323d6567d33a86fa6dc7 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Mon, 18 Mar 2019 13:54:56 +0000
Subject: [PATCH] 02_ignition_firstboot: Enable networking if Ignition will run
Today coreos-assembler is hardcoding the initramfs networking kargs to
do DHCP; this is problematic for e.g. bare metal where one often wants
to configure static networking.
Let's only enable initramfs networking if we're doing Ignition.
---
grub/02_ignition_firstboot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub/02_ignition_firstboot b/grub/02_ignition_firstboot
index a154918..b4e926d 100755
--- a/grub/02_ignition_firstboot
+++ b/grub/02_ignition_firstboot
@@ -9,5 +9,5 @@ search --set=bootpart --label boot
# to be used later on the kernel command line.
set ignition_firstboot=""
if [ -f "(${bootpart})/ignition.firstboot" ]; then
- set ignition_firstboot="ignition.firstboot"
+ set ignition_firstboot="ignition.firstboot rd.neednet=1 ip=dhcp"
fi
--
2.20.1

View File

@ -73,7 +73,7 @@
Name: ignition
Version: 0.31.0
Release: 2.git%{shortcommit}%{?dist}
Release: 3.git%{shortcommit}%{?dist}
Summary: First boot installer and configuration tool
License: ASL 2.0
URL: https://%{provider_prefix}
@ -319,6 +319,7 @@ Requires: dracut-network
BuildArchitectures: noarch
Patch0: 0001-grub-find-boot-partition-and-use-it-directly.patch
Patch1: 0001-02_ignition_firstboot-Enable-networking-if-Ignition-.patch
%description dracut
Dracut modules for ignition to enable ignition services to run in the
@ -342,6 +343,7 @@ initramfs on boot.
%setup -T -D -a 1 -q -n %{repo}-%{commit}
cd %{dracutrepo}-%{dracutcommit}
%patch0 -p1
%patch1 -p1
%build
# Set up PWD as a proper import path for go
@ -484,6 +486,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%endif
%changelog
* Mon Mar 18 2019 Colin Walters <walters@verbum.org> - 0.31.0-3.gitf59a653
- Backport patch for networking
* Mon Mar 04 2019 Dusty Mabe <dusty@dustymabe.com> - 0.31.0-2.gitf59a653
- ignition-dracut: backport patch for finding ignition.firstboot file on UEFI systems
https://github.com/coreos/ignition-dracut/pull/52