From 3f37606a4d509955f136edb1944c8da4a852c46a Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 16 Apr 2008 13:06:51 +0000 Subject: [PATCH] -Add error if mksquashfs isn't executable by the xCAT daemon git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1077 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm index 013087ee4..e65f95549 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -103,6 +103,11 @@ sub process_request { } elsif ($arch =~ /ppc/) { $flags="-be"; } + + if (! -x "/sbin/mksquashfs") { + $callback->({error=>["mksquashfs not found, squashfs-tools rpm should be installed on the management node"],errorcode=>[1]}); + return; + } my $rc = system("mksquashfs $temppath ../rootimg.sfs $flags"); if ($rc) { $callback->({error=>["mksquashfs could not be run successfully"],errorcode=>[1]});