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

Re: Persistent network devices in Debian Installer



On Sunday 06 August 2006 23:50, Marco d'Itri wrote:
> It would help if somebody could send a rough patch to add the missing
> files and especially the code to copy z25_persistent-cd.rules and
> z25_persistent-net.rules to the target system.

Sure. The attached patch should give you a good basis. It builds but is 
otherwise untested. Feel free to tune as needed.

The new script will be run between debootstrap and kernel installation and 
thus also before the intrd is generated.

diff -urN udev-0.093.sv/debian/rules udev-0.093/debian/rules
--- udev-0.093.sv/debian/rules	2006-08-07 00:39:40.880802866 +0200
+++ udev-0.093/debian/rules	2006-08-07 01:02:26.924308608 +0200
@@ -157,6 +157,10 @@
 	install --mode=644 hotplug/modprobe.d/* $(DU)/etc/modprobe.d/
 	install --mode=755 extra/udev.startup \
 		$(DU)/lib/debian-installer-startup.d/S02udev
+	# Need to create this dir as we removed usr/ earlier
+	mkdir -p $(DU)/usr/lib/post-base-installer.d
+	install --mode=755 extra/udev.post-base-installer \
+		$(DU)/usr/lib/post-base-installer.d/05udev
 endif
 ifdef BUILD_KLIBC
 	# FIXME: s/$B/$(BK)/g
diff -urN udev-0.093.sv/debian/udev-udeb.dirs udev-0.093/debian/udev-udeb.dirs
--- udev-0.093.sv/debian/udev-udeb.dirs	2006-08-07 00:39:40.881802723 +0200
+++ udev-0.093/debian/udev-udeb.dirs	2006-08-07 00:49:07.176760346 +0200
@@ -4,3 +4,4 @@
 /lib/debian-installer-startup.d/
 /lib/udev/
 /sbin/
+/usr/lib/post-base-installer.d/
diff -urN udev-0.093.sv/extra/udev.post-base-installer udev-0.093/extra/udev.post-base-installer
--- udev-0.093.sv/extra/udev.post-base-installer	1970-01-01 01:00:00.000000000 +0100
+++ udev-0.093/extra/udev.post-base-installer	2006-08-07 00:44:49.813591547 +0200
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+set -e
+
+RULESDIR=etc/udev/rules.d
+
+mkdir -p /target/$RULESDIR
+cp -a /$RULESDIR/z25_* /target/$RULESDIR 2>/dev/null | true

Attachment: pgpHiVsyagVTU.pgp
Description: PGP signature


Reply to: