Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
84
Issues
84
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
464b0a0f
Commit
464b0a0f
authored
Dec 09, 2016
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rootfs: add error checking for CONFIG_VLANS_PORTXX_VID in assembly_ppsi_conf.sh
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
fb97f3fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
assembly_ppsi_conf.sh
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
+11
-3
No files found.
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
View file @
464b0a0f
...
...
@@ -46,7 +46,7 @@ for i_zero in {01..18};do
"rx"
|
"tx"
|
"fiber"
)
continue
;;
*
)
echo
"Invalid parameter
$param
in CONFIG_PORT"
$i_zero
"_PARAMS"
;;
echo
"
$0
:
Invalid parameter
$param
in CONFIG_PORT"
$i_zero
"_PARAMS"
;;
esac
done
...
...
@@ -90,8 +90,17 @@ for i_zero in {01..18};do
# check port mode
if
[
"
$port_mode_access
"
=
"y"
]
;
then
ppsi_vlans
=
$(
eval
"echo
\$
CONFIG_VLANS_PORT"
$i_zero
"_VID"
)
echo
"vlan
$ppsi_vlans
"
>>
$OUTPUT_FILE
# use "&> /dev/null" to avoid error when $ppsi_vlans
# is not a number
if
[
"
$ppsi_vlans
"
-ge
0
]
&> /dev/null
\
&&
[
"
$ppsi_vlans
"
-le
4094
]
&> /dev/null
;
then
echo
"vlan
$ppsi_vlans
"
>>
$OUTPUT_FILE
else
echo
"
$0
: Wrong value
\"
$ppsi_vlans
\"
in CONFIG_VLANS_PORT"
$i_zero
"_VID"
continue
;
fi
fi
if
[
"
$port_mode_trunk
"
=
"y"
]
\
||
[
"
$port_mode_disabled
"
=
"y"
]
\
||
[
"
$port_mode_unqualified
"
=
"y"
]
;
then
...
...
@@ -106,4 +115,3 @@ for i_zero in {01..18};do
# separate ports
echo
""
>>
$OUTPUT_FILE
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