From 1ca12b3baf89cc3484f646b4b2639978cfa4ae5f Mon Sep 17 00:00:00 2001 From: Chuck Brazie Date: Wed, 3 May 2017 11:41:54 -0400 Subject: [PATCH] Try again to get these updates to GitHub Change-Id: If6a162c43ae9a1c51070dec304de9fd372181933 --- Release | 1 + perl-xCAT/xCAT/Utils.pm | 8 ++++++++ xCAT-UI/lib/functions.php | 2 +- xCAT/xCAT.spec | 23 ++++++++++++----------- 4 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 Release diff --git a/Release b/Release new file mode 100644 index 000000000..a33a0ed75 --- /dev/null +++ b/Release @@ -0,0 +1 @@ +snap000000000000 diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index a39ea8bb2..6154a1bd5 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -2224,11 +2224,19 @@ sub osver $os = $id_like; } + if (!$os ) { + $os = "unknown"; + } + $verrel = $version; if (!$verrel and $version_id) { $verrel = $version_id; } + if (!$verrel ) { + $verrel = "unknown"; + } + if (!$name and $prettyname) { $name = $prettyname; diff --git a/xCAT-UI/lib/functions.php b/xCAT-UI/lib/functions.php index 20c27efa6..f46a7554c 100644 --- a/xCAT-UI/lib/functions.php +++ b/xCAT-UI/lib/functions.php @@ -299,7 +299,7 @@ function isAuthenticated() { */ function isRootAcess() { if (is_logged() && $_SESSION["xcatpassvalid"]) { - $testacc = docmd('tabdump', '', array('policy', '-w', "name==" . $_SESSION["username"]), array()); + $testacc = docmd('tabdump', '', array('-w', "name==" . $_SESSION["username"],'policy' ), array()); if (isset($testacc->{'xcatresponse'}->{'data'}->{1})) { $result = $testacc->{'xcatresponse'}->{'data'}->{1}; $result = str_replace('"', '', $result); diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index be51d91c3..e7301db58 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -29,12 +29,6 @@ Requires: perl-DBD-SQLite Requires: xCAT-client = 4:%{version}-%{release} Requires: xCAT-server = 4:%{version}-%{release} -%ifnarch s390x -Requires: xCAT-probe = 4:%{version}-%{release} -Requires: xCAT-genesis-scripts-x86_64 = 1:%{version}-%{release} -Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release} -%endif - %define pcm %(if [ "$pcm" = "1" ];then echo 1; else echo 0; fi) %define notpcm %(if [ "$pcm" = "1" ];then echo 0; else echo 1; fi) @@ -44,6 +38,13 @@ Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release} # Define a different location for various httpd configs in s390x mode %define httpconfigdir %(if [ "$s390x" = "1" ];then echo "xcathttpdsave"; else echo "xcat"; fi) +%if %nots390x +Requires: xCAT-probe = 4:%{version}-%{release} +Requires: xCAT-genesis-scripts-x86_64 = 1:%{version}-%{release} +Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release} +%endif + + %ifos linux Requires: httpd nfs-utils nmap bind perl(CGI) # on RHEL7, need to specify it explicitly @@ -53,7 +54,7 @@ Requires: /usr/bin/killall Requires: /usr/sbin/dhcpd # On RHEL this pulls in openssh-server, on SLES it pulls in openssh Requires: /usr/bin/ssh -%ifnarch s390x +%if %nots390x Requires: /etc/xinetd.d/tftp Requires: xCAT-buildkit # Stty is only needed for rcons on ppc64 nodes, but for mixed clusters require it on both x and p @@ -64,7 +65,7 @@ Requires: perl-IO-Stty # The aix rpm cmd forces us to do this outside of ifos type stmts %if %notpcm %ifos linux -%ifnarch s390x +%if %nots390x # PCM does not use or ship conserver Requires: conserver-xcat %endif @@ -72,7 +73,7 @@ Requires: conserver-xcat %endif #support mixed cluster -%ifnarch s390x +%if %nots390x Requires: elilo-xcat xnba-undi %endif @@ -89,7 +90,7 @@ Requires: ipmitool-xcat >= 1.8.17-1 %if %notpcm # PCM does not need or ship syslinux-xcat -%ifnarch s390x +%if %nots390x Requires: syslinux-xcat %endif %endif @@ -264,7 +265,7 @@ exit 0 /install/postscripts /install/prescripts %ifos linux -%config /etc/logrotate.d/xcat +/etc/logrotate.d/xcat /etc/rsyslog.d/xcat-cluster.conf /etc/rsyslog.d/xcat-compute.conf /etc/rsyslog.d/xcat-debug.conf