netifd: packet_steering: fix shell error on unset steering_flows option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2024-04-27 20:59:43 +02:00
parent 994f71e0f0
commit 2d6fd937c3

View File

@ -16,7 +16,7 @@ service_triggers() {
reload_service() {
packet_steering="$(uci -q get "network.@globals[0].packet_steering")"
steering_flows="$(uci -q get "network.@globals[0].steering_flows")"
[ "$steering_flows" -gt 0 ] && opts="-l $steering_flows"
[ "${steering_flows:-0}" -gt 0 ] && opts="-l $steering_flows"
if [ -e "/usr/libexec/platform/packet-steering.sh" ]; then
/usr/libexec/platform/packet-steering.sh "$packet_steering"
else