]> git.ipfire.org Git - people/stevee/network.git/commitdiff
port: Don't destroy if it could not be shut down
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Aug 2017 21:47:27 +0000 (23:47 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Aug 2017 21:47:27 +0000 (23:47 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.ports

index f9b31f3f0b5616d5b23673c9b016d6ff54e7581a..af3f5f06dcb375ceb68e799d8d588ffff3042d1c 100644 (file)
@@ -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})
 }