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

[Xen-devel] [OSSTEST PATCH 30/62] persistent-net: Include initramfs script to copy to target



This is the piece which actually copies the installer's network names
to the target.  It should not appear on the installed system, so it's
not in overlay-persistent-net.

Technically this is only useful when the installer has the
overlay-persistent-net in it, which is done only in ts-host-install
and not in all the places where setup_netboot_firstboot is used.
But without overlay-persistent-net it is harmless, and it is most
convenient to put it here.

The little script fragment was copied out of a jessie debian-installer
initramfs environment.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/Debian.pm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index e246c012..6309b246 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -848,6 +848,19 @@ if [ -f /target$grub ] ; then
 fi
 END
 
+    # See comment in debian_overlays re net.ifnames=1
+    $ho->{Suite} =~ m/jessie|wheezy/ or
+       preseed_hook_installscript($ho, $sfx,
+            '/usr/lib/base-installer.d/', '05udev', <<'END');
+#!/bin/sh -e
+
+RULESDIR=etc/udev/rules.d
+
+mkdir -p /target/$RULESDIR
+cp /$RULESDIR/70-persistent-*.rules /target/$RULESDIR 2>/dev/null || true
+
+END
+
     debian_overlays($ho, sub {
        my ($srcdir, $tfilename) = @_;
        preseed_hook_overlay($ho, $sfx, $srcdir, $tfilename);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.