From db25b8cac4c7e4ff8a0842aa00a783e199cb16cf Mon Sep 17 00:00:00 2001 From: mxi1 Date: Thu, 13 Aug 2009 08:36:38 +0000 Subject: [PATCH] the defect 2836707 is fixed; one checkpoint is added to check whether the /proc fs is mounted in the rootimg git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3991 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/sles/genimage | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index 89d327dbe..f9a73ceea 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -264,7 +264,17 @@ if (($postinstall_filename) && (-x $postinstall_filename)) { #some rpms mounts the imageroot/proc on the /proc, need to release it, #otherwise got kernal panic when installing -`umount $installroot/netboot/$osver/$arch/$profile/rootimg/proc`; +#sometimes, the proc fs is not mounted, so one warning/error message will display, +#and I add one check point here. +my $MTABFD; +open MTABFD, "/etc/mtab"; +my @lines = ; +close MTABFD; + +my $ret = grep m{$installroot/netboot/$osver/$arch/$profile/rootimg/proc}, @lines; +if($ret > 0) { + system("umount $installroot/netboot/$osver/$arch/$profile/rootimg/proc"); +} mkinitrd();