Skip to content

Commit

Permalink
fix indentation and add missing return code
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed Mar 19, 2019
1 parent fbbf4bb commit 60d218c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions openwrt/nodogsplash/files/etc/init.d/nodogsplash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 60d218c

Please sign in to comment.