From 2c070624ff5409c618130dbdcabad1b2d64cc6ff Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 21 Oct 2014 03:18:04 -0700 Subject: [PATCH] process the genimage with kit stuff --- xCAT-server/share/xcat/netboot/ubuntu/genimage | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index 2298b324b..12101fbd8 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -1752,7 +1752,7 @@ sub mount_chroot { system("mount -o bind $pkgdir $rootimage_dir/mnt/pkgdir"); if ($otherpkgdir){ if(-d $otherpkgdir){ - system("mount -o bind $otherpkgdir $rootimage_dir/mnt/otherpkgdir"); + system("mount --rbind $otherpkgdir $rootimage_dir/mnt/otherpkgdir"); }else{ print "The specified otherpkgdir $otherpkgdir does not exist!\n" } @@ -1765,7 +1765,8 @@ 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("umount $rootimage_dir/mnt/otherpkgdir"); + system("grep /mnt/otherpkgdir /proc/mounts | cut -f2 -d' ' | sort -r|xargs umount"); rmdir("$rootimage_dir/mnt/pkgdir"); rmdir("$rootimage_dir/mnt/otherpkgdir"); }