These two lines were added at the beginning of syslog. They give syntax error on AIX, not allowing the daemon to start or install to complete successfully. Syslog is required.
[xcatmn1][/install/postscripts]> /install/postscripts/syslog 2>&1
/install/postscripts/syslog[20]: syntax error at line 1 : `(' unexpected
[xcatmn1][/install/postscripts]> vi syslog
The line is
str_dir_name=dirname $0
. $str_dir_name/xcatlib.sh <--- line 20
Not sure why we have this new library but it does not appear to have been tested on AIX. This needs to be fixed quickly and tested on AIX.
All these postscripts have the same problem and those that run on AIX must be changed.
[manage-02][/install/postscripts]> grep xcatlib.sh *
configbond:. $str_dir_name/xcatlib.sh
config_chef_server:. $str_dir_name/xcatlib.sh
configeth:. $str_dir_name/xcatlib.sh
configib:. $str_dir_name/xcatlib.sh
confignics:. $str_dir_name/xcatlib.sh
enablekdump:. $str_dir_name/xcatlib.sh
install_puppet_server:. $str_dir_name/xcatlib.sh
remoteshell:. $str_dir_name/xcatlib.sh
routeop:. $str_dir_name/xcatlib.sh
setupesx:. $str_dir_name/xcatlib.sh
setupntp:. $str_dir_name/xcatlib.sh
sudoer:. $str_dir_name/xcatlib.sh
syslog:. $str_dir_name/xcatlib.sh
Maybe it is time we start running some regression tests on AIX.
Just as a note remoteshell must be fixed because it calls aixremoteshell on AIX. We must get rid of the syntax error. Maybe the best thing is to put a check for linux around the two lines.
For example
if [ "$(uname -s)" = "Linux" ]; then
str_dir_name=
dirname $0fi
Last edit: Lissa Valletta 2014-07-21
hi, Lissa, just as you pointed out, the problem is that the xcatlib.sh can only be used on Linux, this is not properly processed in codelogic of xcatlib.sh and postscripts. I will finish all the fix and checkin the code tomorrow morning.
Hi lissa, since we don't have much code updates in aix, we plan to start our aix regression in the later stage of xcat 2.8.5 testing. I've send a note to our FVT and ask her to start AIX testing now. Thanks!
This issue also occurs when upgrade from 2.8.4 to 2.8.5
bash-3.2# ./instxcat
perl-xCAT ##################################################
xCAT-client ##################################################
xCAT-server ##################################################
xCAT ##################################################
0513-075 The new subsystem name is already on file.
Command failed: /install/postscripts/syslog 2>&1. Error message: /install/postscripts/syslog[20]: syntax error at line 1 : `(' unexpected.
Could not set up syslog.
restartxcatd invoked by root.
0513-044 The xcatd Subsystem was requested to stop.
0513-059 The xcatd Subsystem has been started. Subsystem PID is 10158100.
fixed in 2.8.5:
commit 67ee622cdd5a12e324ef9905740543b0bba4ce0d
Author: immarvin yangsbj@cn.ibm.com
Date: Tue Jul 22 23:16:48 2014 -0700
diff --git a/xCAT/postscripts/config_chef_server b/xCAT/postscripts/config_chef_server
index b1bb266..538c737 100755
--- a/xCAT/postscripts/config_chef_server
+++ b/xCAT/postscripts/config_chef_server
@@ -3,9 +3,10 @@
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#-------------------------------------------------------------------------------
diff --git a/xCAT/postscripts/configbond b/xCAT/postscripts/configbond
index 9d55e53..b709b12 100755
--- a/xCAT/postscripts/configbond
+++ b/xCAT/postscripts/configbond
@@ -34,9 +34,11 @@
# NETWORKS_LINE2=netname=10_0_2_0-255_255_255_0||net=10.0.2.0||mask=255.255.255.0||mgtifname=eth0||gateway=10.0.2.2||dhcpserver=||tftpserver=10.0.2.15||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments=
-# locd library for network caculation
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+# load library for network caculation
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
# Subroutine to display message and pass it to syslog
# Usage: showmsg "message to putput" ["error"]
diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth
index 195fab5..d76cd8d 100755
--- a/xCAT/postscripts/configeth
+++ b/xCAT/postscripts/configeth
@@ -1,7 +1,10 @@
#!/bin/bash
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+
+f [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
function configipv4(){
str_if_name=$1
diff --git a/xCAT/postscripts/configib b/xCAT/postscripts/configib
index 905cbe3..d0c36b5 100755
--- a/xCAT/postscripts/configib
+++ b/xCAT/postscripts/configib
@@ -17,10 +17,10 @@
# NETWORKS_LINE2='netname=ib1||net=15.0.1.0||mask=255.255.255.0||mgtifname=||gateway=15.0.1.254||dhcpserver=||tftpserver=||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments='
# NETWORKS_LINE3='netname=ib3||net=15.0.3.0||mask=255.255.255.0||mgtifname=||gateway=||dhcpserver=||tftpserver=||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments='
-
-str_dir_name=
dirname $0-
-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#This is the number of ports for each ib adpator.
portnum=1
diff --git a/xCAT/postscripts/confignics b/xCAT/postscripts/confignics
index 61c6bac..d743489 100755
--- a/xCAT/postscripts/confignics
+++ b/xCAT/postscripts/confignics
@@ -1,7 +1,10 @@
#!/bin/bash
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#the nics' information contain:
#1. ip address
diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump
index 40ceca2..52b8d7c 100755
--- a/xCAT/postscripts/enablekdump
+++ b/xCAT/postscripts/enablekdump
@@ -4,9 +4,11 @@
#
-str_dir_name=
dirname $0+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
-. $str_dir_name/xcatlib.sh
# create /etc/sysconfig/network-scripts/
pmatch ()
diff --git a/xCAT/postscripts/install_puppet_server b/xCAT/postscripts/install_puppet_server
index ac7cf92..8c399eb 100755
--- a/xCAT/postscripts/install_puppet_server
+++ b/xCAT/postscripts/install_puppet_server
@@ -2,9 +2,10 @@
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#-------------------------------------------------------------------------------
#=head1 install_puppet_server
diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell
index 5ce0aec..1580c51 100755
--- a/xCAT/postscripts/remoteshell
+++ b/xCAT/postscripts/remoteshell
@@ -13,9 +13,10 @@
# if on the Management Node, exit
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
if [ -e /etc/xCATMN ]; then
logger -t xcat -p local4.info "remoteshell:Running on the Management Node , exiting "
diff --git a/xCAT/postscripts/routeop b/xCAT/postscripts/routeop
index 14d66d4..091446d 100755
--- a/xCAT/postscripts/routeop
+++ b/xCAT/postscripts/routeop
@@ -23,8 +23,11 @@
#=cut
#-------------------------------------------------------------------------------
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
op=$1
diff --git a/xCAT/postscripts/setupesx b/xCAT/postscripts/setupesx
index d21c290..40fe21f 100644
--- a/xCAT/postscripts/setupesx
+++ b/xCAT/postscripts/setupesx
@@ -2,9 +2,11 @@
# example on how to set up ESX. We setup ssh and also add a basic
# VLAN configuration
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
logger -t xcat -p local4.info setupesx
# Enable SSH access to root and exchange keys
diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp
index db75578..ec2149b 100755
--- a/xCAT/postscripts/setupntp
+++ b/xCAT/postscripts/setupntp
@@ -7,9 +7,11 @@
#---------------------------------------------------------------------------
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
# if on the Management Node, exit
if [ -e /etc/xCATMN ]; then
diff --git a/xCAT/postscripts/sudoer b/xCAT/postscripts/sudoer
index c15166c..4306413 100755
--- a/xCAT/postscripts/sudoer
+++ b/xCAT/postscripts/sudoer
@@ -8,10 +8,11 @@
#------------------------------------------------------------------------------
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
# Configuration for the sudoer
SUDOER="xcat"
diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog
index 41ddbe3..13e917f 100755
--- a/xCAT/postscripts/syslog
+++ b/xCAT/postscripts/syslog
@@ -14,10 +14,10 @@
#=cut
#-------------------------------------------------------------------------------
-
-str_dir_name=
dirname $0-
-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
master=$MASTER
conf_file="/etc/syslog.conf"
fixed in 2.9:
commit 8b362709b47f4f4beb206c5fe7525d6fad05cba8
Author: immarvin yangsbj@cn.ibm.com
Date: Tue Jul 22 23:16:48 2014 -0700
diff --git a/xCAT/postscripts/config_chef_server b/xCAT/postscripts/config_chef_server
index b1bb266..538c737 100755
--- a/xCAT/postscripts/config_chef_server
+++ b/xCAT/postscripts/config_chef_server
@@ -3,9 +3,10 @@
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#-------------------------------------------------------------------------------
diff --git a/xCAT/postscripts/configbond b/xCAT/postscripts/configbond
index 9d55e53..b709b12 100755
--- a/xCAT/postscripts/configbond
+++ b/xCAT/postscripts/configbond
@@ -34,9 +34,11 @@
# NETWORKS_LINE2=netname=10_0_2_0-255_255_255_0||net=10.0.2.0||mask=255.255.255.0||mgtifname=eth0||gateway=10.0.2.2||dhcpserver=||tftpserver=10.0.2.15||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments=
-# locd library for network caculation
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+# load library for network caculation
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
# Subroutine to display message and pass it to syslog
# Usage: showmsg "message to putput" ["error"]
diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth
index 195fab5..d76cd8d 100755
--- a/xCAT/postscripts/configeth
+++ b/xCAT/postscripts/configeth
@@ -1,7 +1,10 @@
#!/bin/bash
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+
+f [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
function configipv4(){
str_if_name=$1
diff --git a/xCAT/postscripts/configib b/xCAT/postscripts/configib
index 905cbe3..d0c36b5 100755
--- a/xCAT/postscripts/configib
+++ b/xCAT/postscripts/configib
@@ -17,10 +17,10 @@
# NETWORKS_LINE2='netname=ib1||net=15.0.1.0||mask=255.255.255.0||mgtifname=||gateway=15.0.1.254||dhcpserver=||tftpserver=||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments='
# NETWORKS_LINE3='netname=ib3||net=15.0.3.0||mask=255.255.255.0||mgtifname=||gateway=||dhcpserver=||tftpserver=||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments='
-
-str_dir_name=
dirname $0-
-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#This is the number of ports for each ib adpator.
portnum=1
diff --git a/xCAT/postscripts/confignics b/xCAT/postscripts/confignics
index fe98255..4357b01 100755
--- a/xCAT/postscripts/confignics
+++ b/xCAT/postscripts/confignics
@@ -1,7 +1,10 @@
#!/bin/bash
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#the nics' information contain:
#1. ip address
diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump
index 40ceca2..52b8d7c 100755
--- a/xCAT/postscripts/enablekdump
+++ b/xCAT/postscripts/enablekdump
@@ -4,9 +4,11 @@
#
-str_dir_name=
dirname $0+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
-. $str_dir_name/xcatlib.sh
# create /etc/sysconfig/network-scripts/
pmatch ()
diff --git a/xCAT/postscripts/install_puppet_server b/xCAT/postscripts/install_puppet_server
index ac7cf92..8c399eb 100755
--- a/xCAT/postscripts/install_puppet_server
+++ b/xCAT/postscripts/install_puppet_server
@@ -2,9 +2,10 @@
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
#-------------------------------------------------------------------------------
#=head1 install_puppet_server
diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell
index 5ce0aec..1580c51 100755
--- a/xCAT/postscripts/remoteshell
+++ b/xCAT/postscripts/remoteshell
@@ -13,9 +13,10 @@
# if on the Management Node, exit
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
if [ -e /etc/xCATMN ]; then
logger -t xcat -p local4.info "remoteshell:Running on the Management Node , exiting "
diff --git a/xCAT/postscripts/routeop b/xCAT/postscripts/routeop
index 14d66d4..091446d 100755
--- a/xCAT/postscripts/routeop
+++ b/xCAT/postscripts/routeop
@@ -23,8 +23,11 @@
#=cut
#-------------------------------------------------------------------------------
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
op=$1
diff --git a/xCAT/postscripts/setupesx b/xCAT/postscripts/setupesx
index d21c290..40fe21f 100755
--- a/xCAT/postscripts/setupesx
+++ b/xCAT/postscripts/setupesx
@@ -2,9 +2,11 @@
# example on how to set up ESX. We setup ssh and also add a basic
# VLAN configuration
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
logger -t xcat -p local4.info setupesx
# Enable SSH access to root and exchange keys
diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp
index db75578..ec2149b 100755
--- a/xCAT/postscripts/setupntp
+++ b/xCAT/postscripts/setupntp
@@ -7,9 +7,11 @@
#---------------------------------------------------------------------------
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
# if on the Management Node, exit
if [ -e /etc/xCATMN ]; then
diff --git a/xCAT/postscripts/sudoer b/xCAT/postscripts/sudoer
index c15166c..4306413 100755
--- a/xCAT/postscripts/sudoer
+++ b/xCAT/postscripts/sudoer
@@ -8,10 +8,11 @@
#------------------------------------------------------------------------------
-str_dir_name=
dirname $0-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
# Configuration for the sudoer
SUDOER="xcat"
diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog
index 41ddbe3..13e917f 100755
--- a/xCAT/postscripts/syslog
+++ b/xCAT/postscripts/syslog
@@ -14,10 +14,10 @@
#=cut
#-------------------------------------------------------------------------------
-
-str_dir_name=
dirname $0-
-. $str_dir_name/xcatlib.sh
+if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then
+ str_dir_name=
dirname $0+ . $str_dir_name/xcatlib.sh
+fi
master=$MASTER
conf_file="/etc/syslog.conf"
I think this has been fixed, FVT regression did not see this problem. Closing this bug.