buildkit support on debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15842 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
e1c60cb830
commit
786cfde0a8
@ -333,12 +333,24 @@ if ($::HELP)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
my $debianflag = 0;
|
||||
my $tempstring = xCAT::BuildKitUtils->osver();
|
||||
if ( $tempstring =~ /debian/ || $tempstring =~ /ubuntu/ ){
|
||||
$debianflag = 1;
|
||||
}
|
||||
|
||||
# display the version statement if -v or --version is specified
|
||||
if ($::VERSION)
|
||||
{
|
||||
if ( system("rpm -q --qf \"%{NAME}: %{VERSION}-%{RELEASE} \n\" xCAT-buildkit") ) {
|
||||
my $versioncmd = "rpm -q --qf \"%{NAME}: %{VERSION}-%{RELEASE} \n\" xCAT-buildkit";
|
||||
my $message = "Error quering xCAT-buildkit rpm. Version info is not available. \n";
|
||||
if ( $debianflag ){
|
||||
$versioncmd = "dpkg-query --show -f='\${PackageSpec}: \${Version}\n' xcat-buildkit";
|
||||
$message = "Error quering xcat-buildkit pakcage. Version info is not available. \n";
|
||||
}
|
||||
if ( system($versioncmd) ) {
|
||||
# non-zero return from system call
|
||||
print "Error quering xCAT-buildkit rpm. Version info is not available. \n";
|
||||
print $message;
|
||||
exit 1;
|
||||
}
|
||||
exit 0;
|
||||
@ -350,12 +362,6 @@ if ( ! $arg ) {
|
||||
exit (0);
|
||||
}
|
||||
|
||||
my $debianflag = 0;
|
||||
my $tempstring = xCAT::BuildKitUtils->osver();
|
||||
if ( $tempstring =~ /debian/ || $tempstring =~ /ubuntu/ ){
|
||||
$debianflag = 1;
|
||||
}
|
||||
|
||||
while ($arg) {
|
||||
my $command = $arg;
|
||||
$command =~ tr/A-Z/a-z/; # convert to lowercase
|
||||
|
Loading…
Reference in New Issue
Block a user