From 60d218c3cd3d9e45e14fa47a6eff5766bb77b6c8 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Tue, 19 Mar 2019 21:58:01 +0100 Subject: [PATCH] fix indentation and add missing return code --- openwrt/nodogsplash/files/etc/init.d/nodogsplash | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openwrt/nodogsplash/files/etc/init.d/nodogsplash b/openwrt/nodogsplash/files/etc/init.d/nodogsplash index feffcb3..ab360d1 100755 --- a/openwrt/nodogsplash/files/etc/init.d/nodogsplash +++ b/openwrt/nodogsplash/files/etc/init.d/nodogsplash @@ -128,12 +128,12 @@ generate_uci_config() { # Get device name if interface name is a section name in /etc/config/network if network_get_device tmp "$ifname"; then - ifname="$tmp" + ifname="$tmp" fi if [ -z "$ifname" ]; then - echo "Option network or gatewayinterface missing." >&2 - return 1 + echo "Option network or gatewayinterface missing." >&2 + return 1 fi wait_for_interface "$ifname" || return 1 @@ -177,9 +177,9 @@ create_instance() { config_get_bool val "$cfg" enabled 0 [ $val -gt 0 ] || return 0 - if ! generate_uci_config "$cfg" ; then - echo "Can not generate uci config. Will not start instance $cfg." >&2 - return + if ! generate_uci_config "$cfg"; then + echo "Can not generate uci config. Will not start instance $cfg." >&2 + return 1 fi procd_open_instance $cfg