]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
Debian/preseed: copy 70-persistent-net.rules if necessary
authorWei Liu <wei.liu2@citrix.com>
Mon, 7 May 2018 15:03:03 +0000 (16:03 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 10 May 2018 17:17:42 +0000 (18:17 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Osstest/Debian.pm

index b085564d9bf827884bd5d576540f4ad4660087b5..6e443642acc09015fff94b2f667ff4f361876f42 100644 (file)
@@ -841,6 +841,18 @@ set -ex
 echo FANCYTTY=0 >> /target/etc/lsb-base-logging.sh
 END
 
+    # If the installer has generated 70-persistent-net.rules, that
+    # should be copied into the target.
+    preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then
+    mkdir -p /target//etc/udev/rules.d/
+    cp /etc/udev/rules.d/70-persistent-net.rules /target//etc/udev/rules.d/
+fi
+
+END
 
     preseed_ssh($ho, $sfx);