nut: Fix additional (other) variable handling
There was a cut & paste error in the handling of 'other' variables (i.e. driver variables not specifically known to the package but which some users may require to be add). There was also a logic error from not switching sufficient after cut & paste. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This commit is contained in:
parent
d04f2580b1
commit
23c4235554
1 changed files with 6 additions and 6 deletions
|
@ -192,16 +192,16 @@ build_driver_config() {
|
||||||
local othervarflag="$2"
|
local othervarflag="$2"
|
||||||
|
|
||||||
if [ "$othervarflag" = "otherflag" ]; then
|
if [ "$othervarflag" = "otherflag" ]; then
|
||||||
config_get_bool otherval "${othervarflag}_${overtype}" value
|
config_get_bool otherval "${othervarflag}_${othervar}" value
|
||||||
[ "$otherval" = "1" ] && echo "${othervarflag}_${othervar}" >>"$UPS_C"
|
[ "$otherval" = "1" ] && echo "${othervar}" >>"$UPS_C"
|
||||||
else
|
else
|
||||||
config_get otherval "${othervarflag}_${overtype}" value
|
config_get otherval "${othervarflag}_${othervar}" value
|
||||||
[ -n "$otherval" ] && echo "${othervarflag}_${othervar} = $otherval" >>"$UPS_C"
|
[ -n "$otherval" ] && echo "${othervar} = $otherval" >>"$UPS_C"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
config_list_foreach "$cfg" default other other
|
config_list_foreach "$cfg" other other
|
||||||
config_list_foreach "$cfg" default other otherflag
|
config_list_foreach "$cfg" other otherflag
|
||||||
echo "" >>$UPS_C
|
echo "" >>$UPS_C
|
||||||
havedriver=1
|
havedriver=1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue