Lines 146-161
Link Here
|
146 |
opts="${!opts}" |
146 |
opts="${!opts}" |
147 |
|
147 |
|
148 |
# We don't work with these options set by the user |
148 |
# We don't work with these options set by the user |
149 |
for i in unit nodetach linkname maxfail persist ; do |
149 |
for i in unit nodetach linkname persist ; do |
150 |
if [[ " ${opts} " == *" ${i} "* ]]; then |
150 |
if [[ " ${opts} " == *" ${i} "* ]] ; then |
151 |
eerror "The option \"${i}\" is not allowed" |
151 |
eerror "The option \"${i}\" is not allowed" |
152 |
return 1 |
152 |
return 1 |
153 |
fi |
153 |
fi |
154 |
done |
154 |
done |
155 |
|
155 |
|
|
|
156 |
# Default maxfail to 0 unless specified |
157 |
if [[ " ${opts} " != *" maxfail "* ]] ; then |
158 |
opts="${opts} maxfail 0" |
159 |
fi |
160 |
|
156 |
# Check for mtu/mru |
161 |
# Check for mtu/mru |
157 |
local mtu="mtu_${ifvar}" |
162 |
local mtu="mtu_${ifvar}" |
158 |
if [[ -n ${!mtu} ]]; then |
163 |
if [[ -n ${!mtu} ]] ; then |
159 |
[[ " ${opts} " != *" mtu "* ]] && opts="${opts} mtu ${!mtu}" |
164 |
[[ " ${opts} " != *" mtu "* ]] && opts="${opts} mtu ${!mtu}" |
160 |
[[ " ${opts} " != *" mru "* ]] && opts="${opts} mru ${!mtu}" |
165 |
[[ " ${opts} " != *" mru "* ]] && opts="${opts} mru ${!mtu}" |
161 |
fi |
166 |
fi |