Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
orchard
/
CSCS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ed94b0bc
authored
Nov 07, 2018
by
jajapi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed bonding check function 2
parent
880b731c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
GuestPM/cms_webpm/cms_webpm_check.sh
GuestPM/cms_webpm/cms_webpm_check.sh
View file @
ed94b0bc
...
@@ -146,13 +146,14 @@ function CHECK_BONDING() # YB Bonding Check function
...
@@ -146,13 +146,14 @@ function CHECK_BONDING() # YB Bonding Check function
echo
-e
"
\n
------------ Bonding Down Check --------------"
echo
-e
"
\n
------------ Bonding Down Check --------------"
BONDNAME
=(
"bond0"
"bond1"
"bond2"
"bond3"
"bond4"
"bond5"
)
# BONDNAME 배열에 값(bond0 ~ bond5) 저장
BONDNAME
=(
"bond0"
"bond1"
"bond2"
"bond3"
"bond4"
"bond5"
)
# BONDNAME 배열에 값(bond0 ~ bond5) 저장
for
arr_BOND
in
$
(
BONDNAME[
*
]
)
# 배열에 저장된 값을 한번씩 사용하는 반복문
for
arr_BOND
in
$
{
BONDNAME
[*]
}
# 배열에 저장된 값을 한번씩 사용하는 반복문
do
do
echo
-e
"
\0
33[41m"
$arr_BOND
"
\0
33[0m"
echo
-e
"
\0
33[41m"
$arr_BOND
"
\0
33[0m"
cat
/proc/net/bonding/
$arr_BOND
|sed
's/\(Slave Interface.*\)/\x1b[32m\1\x1b[0m/'
|sed
's/\( up\)/\x1b[34m\1\x1b[0m/'
|sed
's/\( down\)/\x1b[31m\1\x1b[0m/'
|sed
's/\(1000\)/\x1b[36m\1\x1b[0m/'
|sed
's/\(10000\)/\x1b[36m\1\x1b[0m/'
cat
/proc/net/bonding/
$arr_BOND
|sed
's/\(Slave Interface.*\)/\x1b[32m\1\x1b[0m/'
|sed
's/\( up\)/\x1b[34m\1\x1b[0m/'
|sed
's/\( down\)/\x1b[31m\1\x1b[0m/'
|sed
's/\(1000\)/\x1b[36m\1\x1b[0m/'
|sed
's/\(10000\)/\x1b[36m\1\x1b[0m/'
DRAW_A_LINE
()
DRAW_A_LINE
done
done
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment