File tree 2 files changed +7
-3
lines changed
risuclient/plugins/core/network
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 8
8
# Folder for risu
9
9
DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
10
10
export RISU_BASE=${DIR} /risuclient/
11
+ export CITELLUS_BASE=${RISU_BASE}
11
12
12
13
# Error code definition
13
14
export RC_OKAY=10
@@ -22,9 +23,11 @@ export TEXTDOMAINDIR=${RISU_BASE}/locale
22
23
23
24
# Root directory for sosreport
24
25
export RISU_ROOT=.
26
+ export CITELLUS_ROOT=${RISU_ROOT}
25
27
26
28
# Force to run non-live
27
29
export RISU_LIVE=0
30
+ export CITELLUS_LIVE=${RISU_LIVE}
28
31
29
32
# Load common functions
30
33
. ${RISU_BASE} /common-functions.sh
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ RC_STATUS=${RC_OKAY}
51
51
52
52
# Sometimes NIC might have a fancy name instead of ifcfg-$IFNAME, use MACs for matching
53
53
MACS_IN_SYSTEM=$( grep -i -a2 " state UP" ${IP_ADDRESS_FILE} | grep ether | awk ' {print $2}' | sort -u)
54
- IFACES_IN_SYSTEM=$( grep -i " state UP" ${IP_ADDRESS_FILE} | cut -f2 -d " :" )
54
+ IFACES_IN_SYSTEM=$( grep -i " state UP" ${IP_ADDRESS_FILE} | cut -f2 -d " :" | tr -d " " )
55
55
declare -A IFACES_MACS
56
56
57
57
for iface in ${IFACES_IN_SYSTEM} ; do
@@ -74,8 +74,9 @@ for iface in ${IFACES_IN_SYSTEM}; do
74
74
for ifacefile in ${RISU_ROOT} /etc/sysconfig/network-scripts/ifcfg-* ; do
75
75
if is_lineinfile ${iface} ${ifacefile} ; then
76
76
NETWORK_INTERFACE_FILE=${ifacefile}
77
- if ! is_lineinfile ' onboot=yes' ${NETWORK_INTERFACE_FILE} ; then
78
- echo " Interface '$interface_name ' up but not 'onboot=YES' in the ${NETWORK_INTERFACE_FILE} file!" >&2
77
+ status=$( cat ${NETWORK_INTERFACE_FILE} | grep -i onboot | grep -v ^# | cut -d "=" -f 2- | xargs echo | tr "[:upper:]" "[:lower:]")
78
+ if [ ${status} != " yes" ]; then
79
+ echo " Interface '${iface} ' up but not 'onboot=YES' in the ${NETWORK_INTERFACE_FILE} file!" >&2
79
80
RC_STATUS=${RC_FAILED}
80
81
fi
81
82
fi
You can’t perform that action at this time.
0 commit comments