From e81496cac95f2ebeef15d25c3f618619f33e96b6 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Tue, 28 Oct 2014 06:09:37 -0400 Subject: [PATCH] support ubuntu 14.04.1 ppc64el diskless --- xCAT-server/share/xcat/netboot/ubuntu/genimage | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index c03206811..efe37096c 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -465,7 +465,8 @@ unless ($onlyinitrd) { # run apt-get upgrade to update any installed debs # needed when running genimage again after updating software in repositories - my $aptgetcmd_update = $yumcmd_base . " upgrade "; + #my $aptgetcmd_update = $yumcmd_base . " upgrade "; + my $aptgetcmd_update = $aptgetcmd . "&&". $aptgetcmdby . " upgrade "; $rc = system("$aptgetcmd_update"); print("Umount /proc, /dev, /sys, pkgdir and otherpkgdir to the rootimg.\n"); umount_chroot($rootimg_dir); @@ -1783,9 +1784,13 @@ sub umount_chroot { #system("umount $rootimage_dir/proc"); #system("umount $rootimage_dir/sys"); system("umount $rootimage_dir/mnt/pkgdir"); - #system("umount $rootimage_dir/mnt/otherpkgdir"); - system("grep /mnt/otherpkgdir /proc/mounts | cut -f2 -d' ' | sort -r|xargs umount"); rmdir("$rootimage_dir/mnt/pkgdir"); + #system("umount $rootimage_dir/mnt/otherpkgdir"); + #system("grep /mnt/otherpkgdir /proc/mounts | cut -f2 -d' ' | sort -r|xargs umount"); + my @data = `grep /mnt/otherpkgdir /proc/mounts | cut -f2 -d' ' | sort -r`; + foreach (@data) { + `umount $_`; + } rmdir("$rootimage_dir/mnt/otherpkgdir"); }