From db1e95f0c839161271523b2ff07f58d182944ac6 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 14 Apr 2012 14:19:34 +0000 Subject: [PATCH] Have packimage skip mounted filesystems (e.g. proc, sys, etc that might be accidentally hanging around). git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12235 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/packimage.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm index c201d6e02..2060e894f 100644 --- a/xCAT-server/lib/xcat/plugins/packimage.pm +++ b/xCAT-server/lib/xcat/plugins/packimage.pm @@ -227,7 +227,7 @@ sub process_request { } my $xcat_packimg_tmpfile = "/tmp/xcat_packimg.$$"; - my $excludestr = "find . "; + my $excludestr = "find . -xdev "; my $includestr; if ($exlistloc) { my $exlist; @@ -275,7 +275,7 @@ sub process_request { $excludestr =~ s/-a $//; if ($includestr) { $includestr =~ s/-o $//; - $includestr = "find . " . $includestr; + $includestr = "find . -xdev " . $includestr; } print "\nexcludestr=$excludestr\n\n includestr=$includestr\n\n"; # debug @@ -337,7 +337,7 @@ sub process_request { unlink("$destdir/rootimg.sfs"); if ($method =~ /cpio/) { if ( ! $exlistloc ) { - $excludestr = "find . |cpio -H newc -o | gzip -c - > ../rootimg.gz"; + $excludestr = "find . -xdev |cpio -H newc -o | gzip -c - > ../rootimg.gz"; }else { chdir("$rootimg_dir"); system("$excludestr >> $xcat_packimg_tmpfile");