fix defect #4233 syslog changes give syntax error on AIX

This commit is contained in:
immarvin 2014-07-22 23:16:48 -07:00
parent b07006d576
commit 8b362709b4
13 changed files with 56 additions and 35 deletions

View File

@ -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
#-------------------------------------------------------------------------------

View File

@ -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"]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ()

View File

@ -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

View File

@ -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 "

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"