[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#486182: Installed system does not have functioning networking



Package: live-installer
Severity: normal
Version: 5
Tags: patch

After installation via live-installer, one is left with a system without
networking dispite netcfg configuring it correctly. The attached patch
copies d-i networking settings (if they exist) to the target instead of
simply deleting them.


Regards,

-- 
Chris Lamb, UK                                       chris@chris-lamb.co.uk
                                                            GPG: 0x634F9A20
From 1ab50c8fc84f05c6b12ee6c8ba470cb25d682025 Mon Sep 17 00:00:00 2001
From: Chris Lamb <chris@chris-lamb.co.uk>
Date: Sat, 14 Jun 2008 06:40:13 +0100
Subject: [PATCH] Override live-image network data info from d-i instead of removing it

After installation via live-installer, one is left with a system without
networking dispite netcfg configuring it correctly. This patch copies
d-i networking settings (if they exist) to the target.

This operation is already performed a base-installer.d pre-installation
hook, but the changes are overridden during the extraction of the live
filesystem image. An alternative to this patch would be to run the pre-
installation hooks post-extraction, but that seems to be asking for
trouble.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
---
 packages/live-installer/live-installer.d/network |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/packages/live-installer/live-installer.d/network b/packages/live-installer/live-installer.d/network
index 27863b6..93e461a 100755
--- a/packages/live-installer/live-installer.d/network
+++ b/packages/live-installer/live-installer.d/network
@@ -1,4 +1,10 @@
 #!/bin/sh -e
 
-# Remove live-cd network data
-rm -f /target/etc/hostname /target/etc/hosts /target/etc/network/interfaces
+# Override live-cd network data info from d-i
+for file in /etc/network/interfaces /etc/networks /etc/hostname /etc/resolv.conf /etc/hosts; do
+	rm -f /target/$file
+	if [ -f "$file" ]; then
+		mkdir /target/$(dirname $file) -p
+		cp $file /target/$file
+	fi
+done
-- 
1.5.5.4

Attachment: signature.asc
Description: PGP signature


Reply to: