mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
checking if /etc/os-release/ file is existed
This commit is contained in:
parent
5ce172a932
commit
bc913e0464
@ -46,7 +46,7 @@ network_ipv4calc ()
|
||||
echo $NETWORK
|
||||
}
|
||||
|
||||
if (cat /etc/os-release |grep -i '^NAME=[ "]*Cumulus Linux[ "]*$' >/dev/null 2>&1); then
|
||||
if [ -f /etc/os-release ] && (cat /etc/os-release |grep -i '^NAME=[ "]*Cumulus Linux[ "]*$' >/dev/null 2>&1); then
|
||||
osver="cumulus"
|
||||
fi
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#enable debug
|
||||
#set -x
|
||||
|
||||
if cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then
|
||||
if [ -f /etc/os-release ] && cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then
|
||||
#TODO
|
||||
echo "Cumulus OS is not supported yet, nothing to do..."
|
||||
logger -t xcat -p local4.info "Cumulus OS is not supported yet, nothing to do..."
|
||||
|
@ -12,7 +12,7 @@
|
||||
#
|
||||
# if on the Management Node, exit
|
||||
|
||||
if cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then
|
||||
if [ -f /etc/os-release ] && cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then
|
||||
#TODO
|
||||
echo "Cumulus OS is not supported yet, nothing to do..."
|
||||
logger -t xcat -p local4.info "Cumulus OS is not supported yet, nothing to do..."
|
||||
|
2
xCAT/postscripts/syncfiles
Normal file → Executable file
2
xCAT/postscripts/syncfiles
Normal file → Executable file
@ -14,7 +14,7 @@ if [ -d /.statelite ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then
|
||||
if [ -f /etc/os-release ] && cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then
|
||||
#TODO
|
||||
echo "Cumulus OS is not supported yet, nothing to do..."
|
||||
logger -t xcat -p local4.info "Cumulus OS is not supported yet, nothing to do..."
|
||||
|
@ -149,7 +149,9 @@ config_rsyslog_V8()
|
||||
remoteconf="/etc/rsyslog.d/remote.conf"
|
||||
|
||||
#for Cumulus OS inside ONIE switches
|
||||
cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 && remoteconf="/etc/rsyslog.d/99-syslog.conf"
|
||||
if [ -f /etc/os-release ]; then
|
||||
cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 && remoteconf="/etc/rsyslog.d/99-syslog.conf"
|
||||
fi
|
||||
|
||||
# If this is a Management Node or Service Node, then it will be receiving syslog entries from the
|
||||
# compute nodes. Management Node is receiving from Service Nodes and possibly compute nodes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user