package/base-files: /lib/functions.sh: let service_stop exit early if no matching...
authorNicolas Thill <nico@openwrt.org>
Tue, 8 Nov 2011 23:35:13 +0000 (23:35 +0000)
committerNicolas Thill <nico@openwrt.org>
Tue, 8 Nov 2011 23:35:13 +0000 (23:35 +0000)
SVN-Revision: 28870

package/base-files/files/lib/functions.sh

index 389f8eb98d65c6a93040dd4bba3292ff821e3fe7..43ce60ee15e39fd93ded7e7777201f1b3c771bbc 100755 (executable)
@@ -351,7 +351,7 @@ service_start() {
 
 service_stop() {
        local try
-       SERVICE_SIG="${SERVICE_SIG:-$SERVICE_SIG_STOP}" service -K "$@"
+       SERVICE_SIG="${SERVICE_SIG:-$SERVICE_SIG_STOP}" service -K "$@" || return 1
        while [ $((try++)) -lt $SERVICE_STOP_TIME ]; do
                service -C "$@" || return 0
                sleep 1