From a632f3186c23714d4f003ccee41c1173e0013e31 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 20 Feb 2015 13:43:29 -0500 Subject: [PATCH] For Ubuntu 14.04.2 LTS support, the linux-image-generic is called linux-image-generic-lts-utopic and in the genimage we search for linux-image-generic pattern and replace with "linux-image-generic" This causes problems when creating diskless images for Ubuntu 14.04.2 Also creating new pkglist files for diskful and diskless images --- xCAT-server/lib/xcat/plugins/genimage.pm | 12 ++++++++++++ .../ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist | 15 +++++++++++++++ .../ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist | 1 + .../ubuntu/compute.ubuntu14.04.ppc64el.pkglist | 15 +++++++++++++++ .../ubuntu/compute.ubuntu14.04.ppc64le.pkglist | 1 + .../ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist | 15 +++++++++++++++ .../ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist | 1 + .../ubuntu/compute.ubuntu14.04.ppc64le.pkglist | 16 +--------------- xCAT-server/share/xcat/netboot/ubuntu/genimage | 2 +- 9 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist create mode 120000 xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist create mode 100644 xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64el.pkglist create mode 120000 xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64le.pkglist create mode 100644 xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist create mode 120000 xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist mode change 100644 => 120000 xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64le.pkglist diff --git a/xCAT-server/lib/xcat/plugins/genimage.pm b/xCAT-server/lib/xcat/plugins/genimage.pm index 3f068bb3f..e3959b1c5 100644 --- a/xCAT-server/lib/xcat/plugins/genimage.pm +++ b/xCAT-server/lib/xcat/plugins/genimage.pm @@ -168,12 +168,24 @@ sub process_request { return 1; } $pkglist = $ref_linuximage_tab->{'pkglist'}; + if (! -e $pkglist) { + $callback->({error=>["The pkglist specified \'$pkglist\' does not exist!"],errorcode=>[1]}); + return 1; + } $srcdir = $ref_linuximage_tab->{'pkgdir'}; $srcdir_otherpkgs = $ref_linuximage_tab->{'otherpkgdir'}; $otherpkglist = $ref_linuximage_tab->{'otherpkglist'}; + if (! -e $otherpkglist) { + $callback->({error=>["The otherpkglist specified \'$otherpkglist\' does not exist!"],errorcode=>[1]}); + return 1; + } $postinstall_filename = $ref_linuximage_tab->{'postinstall'}; + if (! -e $postinstall_filename) { + $callback->({error=>["The postinstall_filename specified \'$postinstall_filename\' does not exist!"],errorcode=>[1]}); + return 1; + } $destdir = $ref_linuximage_tab->{'rootimgdir'}; $rootimg_dir = $ref_linuximage_tab->{'rootimgdir'}; $driverupdatesrc = $ref_linuximage_tab->{'driverupdatesrc'}; diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist new file mode 100644 index 000000000..0b69a32dc --- /dev/null +++ b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist @@ -0,0 +1,15 @@ +bash +nfs-common +openssl +isc-dhcp-client +libc-bin +linux-image-generic-lts-utopic +openssh-server +openssh-client +wget +vim +ntp +rsync +busybox-static +gawk +dnsutils diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist new file mode 120000 index 000000000..1d26ee80e --- /dev/null +++ b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist @@ -0,0 +1 @@ +compute.ubuntu14.04.2.ppc64el.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64el.pkglist b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64el.pkglist new file mode 100644 index 000000000..818b8f26f --- /dev/null +++ b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64el.pkglist @@ -0,0 +1,15 @@ +bash +nfs-common +openssl +isc-dhcp-client +libc-bin +linux-image-generic +openssh-server +openssh-client +wget +vim +ntp +rsync +busybox-static +gawk +dnsutils diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64le.pkglist b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64le.pkglist new file mode 120000 index 000000000..b071ab8dc --- /dev/null +++ b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu14.04.ppc64le.pkglist @@ -0,0 +1 @@ +compute.ubuntu14.04.ppc64el.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist new file mode 100644 index 000000000..0b69a32dc --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64el.pkglist @@ -0,0 +1,15 @@ +bash +nfs-common +openssl +isc-dhcp-client +libc-bin +linux-image-generic-lts-utopic +openssh-server +openssh-client +wget +vim +ntp +rsync +busybox-static +gawk +dnsutils diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist new file mode 120000 index 000000000..1d26ee80e --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.2.ppc64le.pkglist @@ -0,0 +1 @@ +compute.ubuntu14.04.2.ppc64el.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64le.pkglist deleted file mode 100644 index 818b8f26f..000000000 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64le.pkglist +++ /dev/null @@ -1,15 +0,0 @@ -bash -nfs-common -openssl -isc-dhcp-client -libc-bin -linux-image-generic -openssh-server -openssh-client -wget -vim -ntp -rsync -busybox-static -gawk -dnsutils diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64le.pkglist new file mode 120000 index 000000000..b071ab8dc --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64le.pkglist @@ -0,0 +1 @@ +compute.ubuntu14.04.ppc64el.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index a35c2033f..478715df4 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -397,7 +397,7 @@ unless ($onlyinitrd) { push @npa, $kernelname; } elsif ($p =~ /linux-image-generic/) { - $kernelimage = "linux-image-generic"; + $kernelimage = $p; } elsif ($p =~ /^@/) { push @npa, "\"$p\"";