From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2211224D1 for ; Wed, 8 May 2024 06:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151043; cv=none; b=XWVTjGmzmM1aaxtvt+uUlje8IRIC2Yvc3gcD2myztcl4Xua8kVtgn/aJaA0FatVs20eezT0vdFcK+yaeOLyrVm/+TEEQKJFIg7U6YuOw8Slf9QlTUSygzJ5dj1yK0OGsHrJaM1/qg13rfIg83MlHryhIwm7j1b3rEZGLiv8QDxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151043; c=relaxed/simple; bh=e08fyqtFGKSb6g9gFYAfLDVrgQ712qeWd04Y/2lRev8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lXjdVGuzICI+QBdHQ+dqdkF0zmBmR8dsRdYTz8FVLKPoeHNXUxq/QFyqG9hA8TKVa9cpO9ykDoLp04ATWtelfEeBtcUskClPbpsCPVHyQePHyEWBwuvkapHSuiyPt68/V242rjlRBkighw/AUusJGglzY0EKTtHsaB47FmLX+HM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=XaThbcYl; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XaThbcYl" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=UoXQ2etFxrqRx0ErHAnuT+qskpF4rmlvxOk+v8GSEiQ=; b=XaThbcYlVT4HAw5KGoIglKhjlx 7aJ6V5MgQ0F8YFum/y7MA0Yvc6YWcdPdZiMrp5OiQWZysaftBsswgCq0GQMS88JcNRyspWb9ErkVM HywIREfFEjtRE7umC06QHphfKAOylV2BRuvl3QP+ND+TC2AusDEeeXJC/8+fgJAZHA/3YrBUv3r// IZKTz+qHxkFVcYQc2WTFIkvLxz+rfo2FXSa+wAEwa2Bp6chBdZL4Qq+qa55bC8RghIdR8T4hFAPZN w+b8XIwDTh9q0pS1esfWlfXSnGYRglmq+7i9zx4jNIUBFmyUBbUAcmtvOmy+zSjjVxepvLjblNyec MydtwSjg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4b8S-0000000EIkm-2FeW; Wed, 08 May 2024 06:50:40 +0000 From: Luis Chamberlain To: kdevops@lists.linux.dev Cc: mcgrof@kernel.org Subject: [PATCH 10/10] guestfs: move debian pre-install hacks to its own routine Date: Tue, 7 May 2024 23:50:38 -0700 Message-ID: <20240508065039.3408637-11-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240508065039.3408637-1-mcgrof@kernel.org> References: <20240508065039.3408637-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain As with prior commits. Tidy up. Signed-off-by: Luis Chamberlain --- scripts/bringup_guestfs.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh index 6f96b5c2029a..b81c9d5c38d1 100755 --- a/scripts/bringup_guestfs.sh +++ b/scripts/bringup_guestfs.sh @@ -201,6 +201,19 @@ root-password password:kdevops _EOT } +# Ugh, debian has to be told to bring up the network and regenerate ssh keys +# Hope we get that interface name right! +debian_pre_install_hacks() +{ + cat <<_EOT >>$cmdfile +mkdir /etc/network/interfaces.d/ +append-line /etc/network/interfaces.d/enp1s0:auto enp1s0 +append-line /etc/network/interfaces.d/enp1s0:allow-hotplug enp1s0 +append-line /etc/network/interfaces.d/enp1s0:iface enp1s0 inet dhcp +firstboot-command dpkg-reconfigure openssh-server +_EOT +} + mkdir -p $STORAGEDIR mkdir -p $BASE_IMAGE_DIR @@ -236,16 +249,8 @@ if [ ! -f $BASE_IMAGE ]; then handle_rhel_unreg fi -# Ugh, debian has to be told to bring up the network and regenerate ssh keys -# Hope we get that interface name right! if echo $OS_VERSION | grep -q '^debian'; then - cat <<_EOT >>$cmdfile -mkdir /etc/network/interfaces.d/ -append-line /etc/network/interfaces.d/enp1s0:auto enp1s0 -append-line /etc/network/interfaces.d/enp1s0:allow-hotplug enp1s0 -append-line /etc/network/interfaces.d/enp1s0:iface enp1s0 inet dhcp -firstboot-command dpkg-reconfigure openssh-server -_EOT + debian_pre_install_hacks fi echo "Generating new base image for ${OS_VERSION}" -- 2.43.0