2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

enhance packimage (#3919)

This commit is contained in:
Yuan Bai 2017-09-14 17:34:24 +08:00 committed by yangsong
parent d45f7d4508
commit f61a794da8

View File

@ -484,7 +484,7 @@ sub process_request {
unlink glob("$destdir/rootimg.*");
if ($method =~ /cpio/) {
if (!$exlistloc) {
if (!$excludestr) {
$excludestr = "find . -xdev -print0 | cpio -H newc -o -0 | $compress -c - > ../rootimg.$suffix";
} else {
chdir("$rootimg_dir");
@ -505,7 +505,7 @@ sub process_request {
if ($checkoption2 !~ /unrecognized/) {
$option .= "--selinux ";
}
if (!$exlistloc) {
if (!$excludestr) {
$excludestr = "find . -xdev -print0 | tar $option --no-recursion --use-compress-program=$compress --null -T - -cf ../rootimg.$suffix";
} else {
chdir("$rootimg_dir");
@ -526,7 +526,6 @@ sub process_request {
}
$excludestr = "cat $xcat_packimg_tmpfile|cpio -dump $temppath";
}
chdir("$rootimg_dir");
my $outputmsg = `$excludestr 2>&1`;
unless($?){