From 54a55a4d0d3fcf5cc25b0f66543b67f0eddbc3a6 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 10 Apr 2019 14:26:33 -0400 Subject: [PATCH] Verify debootstrap command can be executed --- xCAT-server/share/xcat/netboot/ubuntu/genimage | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index ab7896726..e8f490bd8 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -333,10 +333,14 @@ unless ($onlyinitrd) { } } + if (! -x $aptcmd1) { + print "Error: Can not execute $aptcmd1 command. Make sure you are running on a Debian based system.\n"; + exit 1; + } print "Run cmd [$aptcmd1 $aptcmd2] to create rootimage bootstraps\n"; my $rc = system("$aptcmd1 $aptcmd2"); if ($rc) { - print "Error: cannnot create bootstraps for rootimage. Make sure you specified full http mirror path.\n"; + print "Error: Can not create bootstraps for rootimage. Make sure you specified full http mirror path.\n"; exit 1; }