From: Syrone Wong Date: Tue, 5 May 2020 23:49:04 +0000 (+0800) Subject: wsdd2: fix infinite loop when BI_PARM is never set X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=48d9521ecd75e6651d750642ae1d6da3ada2bc52;p=openwrt-packages.git wsdd2: fix infinite loop when BI_PARM is never set If BI_PARM is never set, it's "" and causes infinite loop (before my PR sent upstream) or error out (after my PR sent upstream). Append -b option only if it's valid. Signed-off-by: Syrone Wong --- diff --git a/net/wsdd2/files/wsdd2.init b/net/wsdd2/files/wsdd2.init index ee60eee2d..ff7134d4f 100644 --- a/net/wsdd2/files/wsdd2.init +++ b/net/wsdd2/files/wsdd2.init @@ -68,7 +68,7 @@ start_service() { [ -n "$ifname" ] && procd_append_param command -i "$ifname" procd_append_param command -N "$NB_PARM" procd_append_param command -G "$WG_PARM" - procd_append_param command -b "$BI_PARM" + [ "x${BI_PARM}" != "x" ] && procd_append_param command -b "$BI_PARM" procd_set_param respawn procd_set_param file "$SMB_CONF" procd_close_instance