From: Michael Tremer Date: Thu, 10 Aug 2017 21:47:27 +0000 (+0200) Subject: port: Don't destroy if it could not be shut down X-Git-Tag: 009~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54c790c28886bfba27c17e2eea75f38e025a2ede;p=network.git port: Don't destroy if it could not be shut down Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.ports b/src/functions/functions.ports index f9b31f3f..af3f5f06 100644 --- a/src/functions/functions.ports +++ b/src/functions/functions.ports @@ -194,7 +194,10 @@ port_destroy() { fi done - port_remove "${port}" + # Shut down the port before destroying it + if ! port_remove "${port}"; then + return ${EXIT_ERROR} + fi rm -rf $(port_dir ${port}) }