From dbeac84fd78c09b40b6fbea5f069994d8b5eeb13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Mon, 25 Jun 2018 20:52:45 +0800 Subject: [PATCH] For Ubuntu 18.04 support, search a different place for Linux kernel and initrd (#5322) --- xCAT-server/lib/xcat/plugins/debian.pm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 7fde6382a..3d2c6ce6b 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -768,7 +768,8 @@ sub mkinstall { next; } - if ($arch =~ /ppc64/i and !(-e "$pkgdir/install/netboot/initrd.gz")) { + if ($arch =~ /ppc64/i and !(-e "$pkgdir/install/netboot/initrd.gz") and + !(-e "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz")) { xCAT::MsgUtils->report_node_error($callback, $node, "The network boot initrd.gz is not found in $pkgdir/install/netboot. This is provided by Ubuntu, please download and retry." ); @@ -804,10 +805,16 @@ sub mkinstall { ) ) or ( $arch =~ /ppc64/i and ( - -r "$pkgdir/install/vmlinux" - and $kernpath = "$pkgdir/install/vmlinux" - and -r "$pkgdir/install/netboot/initrd.gz" - and $initrdpath = "$pkgdir/install/netboot/initrd.gz" + (-r "$pkgdir/install/netboot/ubuntu-installer/$darch/vmlinux" + and $kernpath = "$pkgdir/install/install/netboot/ubuntu-installer/$darch/vmlinux" + and -r "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz" + and $initrdpath = "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz" + ) or + (-r "$pkgdir/install/vmlinux" + and $kernpath = "$pkgdir/install/vmlinux" + and -r "$pkgdir/install/netboot/initrd.gz" + and $initrdpath = "$pkgdir/install/netboot/initrd.gz" + ) ) ) )