From 1c88d50163e709734a82d09b00961d6ec0daa9c5 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Mon, 1 Jun 2020 14:29:12 -0400 Subject: [PATCH] Improve genimage message --- xCAT-server/share/xcat/netboot/ubuntu/genimage | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index ab53db7f9..32163e784 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -336,6 +336,11 @@ unless ($onlyinitrd) { print "Run cmd [$aptcmd1 $aptcmd2] to create rootimage bootstraps\n"; my $rc = system("$aptcmd1 $aptcmd2"); if ($rc) { + my $os=xCAT::Utils->osver("os"); + if ($os ne 'ubuntu') { + print "Error: Can not run genimage for Ubunty OS on a non-Ubunty system ($os)"; + exit 1; + } print "Error: Can not create bootstraps for rootimage. Make sure you specified full http mirror path.\n"; exit 1; }