diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index c9261588c..6118ecc53 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -112,6 +112,10 @@ sub mount_chroot { sub umount_chroot { my $rootimage_dir = shift; + if ($rootimage_dir eq "") { + print "\n\n\n\nWARNING: /proc and /sys may still be mounted in the rootimgdir\n\n\n\n"; + return 1; + } if (majversion($osver) > 6) { system("umount -l $rootimage_dir/proc"); diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index 5dbd8d482..1e9ccf0e8 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -2110,6 +2110,11 @@ sub mount_chroot { sub umount_chroot { my $rootimage_dir = shift; + if ($rootimage_dir eq "") { + print "\n\n\n\nWARNING: /proc and /sys may still be mounted in the rootimgdir\n\n\n\n"; + return 1; + } + system("umount -l $rootimage_dir/proc"); system("umount -l $rootimage_dir/sys");