mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
Verify zypper command can be executed
This commit is contained in:
parent
54a55a4d0d
commit
002c40f9e6
@ -255,6 +255,12 @@ unless ($onlyinitrd) {
|
||||
my $non_interactive;
|
||||
if (!$prompt) { $non_interactive = "--non-interactive --no-gpg-checks --gpg-auto-import-keys"; }
|
||||
|
||||
my $zypper_cmd = "zypper";
|
||||
if (! -x $zypper_cmd) {
|
||||
print "Can not execute $zypper_cmd command. Make sure you are running on SUSE based system";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if ($osver_host >= 11) { #zypper in SLES11 is different
|
||||
|
||||
system("rm -rf $rootimg_dir/etc/zypp/repos.d/$osver-*.repo");
|
||||
|
Loading…
x
Reference in New Issue
Block a user