]> git.ipfire.org Git - people/stevee/network.git/blobdiff - functions.switch
switch: Fix attaching/detaching ports.
[people/stevee/network.git] / functions.switch
index 69894ff47d5b5aa7ddb49fc1a491f569197bf7a2..e417efdd76ad3a16c04d888565db229f1e24d2c5 100644 (file)
@@ -77,7 +77,7 @@ function switch_attach_port() {
        assert isset port
 
        log DEBUG "Attaching port '${port}' to switch '${device}'"
-       ovs-vsctl -- --may-exist ${device} ${port}
+       ovs-vsctl -- --may-exist add-port "${device}" "${port}"
 
        return ${EXIT_OK}
 }
@@ -90,7 +90,7 @@ function switch_detach_port() {
        assert isset port
 
        log DEBUG "Detaching port '${port}' from switch '${device}'"
-       ovs-vsctl -- --if-exists ${device} ${port}
+       ovs-vsctl -- --if-exists del-port "${device}" "${port}"
 
        return ${EXIT_OK}
 }