Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
85
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
464b0a0f
Commit
464b0a0f
authored
8 years ago
by
Adam Wujek
Browse files
Options
Downloads
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
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
+11
-3
11 additions, 3 deletions
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
with
11 additions
and
3 deletions
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
+
11
−
3
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
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment