lakitu: Enable predictable interface name

Enable predicatable interface name on COS on vSphere
only, and will also add corresponding test.

BUG=b/174084981, b/174077205
TEST=presubmit and vmtest
RELEASE_NOTE=None

Change-Id: Icbb7f4ffee77ef547d0df830930ca7576d00c5fe
Reviewed-on: https://cos-review.googlesource.com/c/cos/overlays/board-overlays/+/10622
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
diff --git a/project-lakitu/profiles/platform/vsphere/make.defaults b/project-lakitu/profiles/platform/vsphere/make.defaults
index d3ad18a..baa3d01 100644
--- a/project-lakitu/profiles/platform/vsphere/make.defaults
+++ b/project-lakitu/profiles/platform/vsphere/make.defaults
@@ -17,3 +17,6 @@
 
 # Enable platform vsphere related change
 USE="${USE} platform_vsphere"
+
+# Enable predictable interface name
+USE="${USE} predictable-interface-name"
diff --git a/project-lakitu/sys-apps/systemd/systemd-239-r19.ebuild b/project-lakitu/sys-apps/systemd/systemd-239-r20.ebuild
similarity index 100%
rename from project-lakitu/sys-apps/systemd/systemd-239-r19.ebuild
rename to project-lakitu/sys-apps/systemd/systemd-239-r20.ebuild
diff --git a/project-lakitu/sys-apps/systemd/systemd-239.ebuild b/project-lakitu/sys-apps/systemd/systemd-239.ebuild
index 318874c..71b9c47 100644
--- a/project-lakitu/sys-apps/systemd/systemd-239.ebuild
+++ b/project-lakitu/sys-apps/systemd/systemd-239.ebuild
@@ -22,7 +22,7 @@
 SLOT="0/2"
 
 # lakitu: Added "doc" USE flag to conditionalize the installation of docs.
-IUSE="acl apparmor audit build cryptsetup curl doc elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla vtconsole xkb"
+IUSE="acl apparmor audit build cryptsetup curl doc elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla vtconsole xkb predictable-interface-name"
 
 REQUIRED_USE="importd? ( curl gcrypt lzma )"
 RESTRICT="!test? ( test )"
@@ -396,10 +396,12 @@
 	insinto /usr/lib/systemd/network
 	doins "${FILESDIR}"/*.network
 
-	# Turn off Predictable Network Interface Names to minimize the
-	# upgrade side-effects.
-	# https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
-	dosym /dev/null /etc/systemd/network/99-default.link
+	if ! use predictable-interface-name; then
+		# Turn off Predictable Network Interface Names to minimize the
+		# upgrade side-effects.
+		# https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+		dosym /dev/null /etc/systemd/network/99-default.link
+	fi
 
 	# Enable accounting for all supported controllers (CPU, Memory and Block)
 	sed -i 's/#DefaultCPUAccounting=no/DefaultCPUAccounting=yes/' "${ED}"/etc/systemd/system.conf