]> git.ipfire.org Git - people/stevee/network.git/commitdiff
stp: Change comparison operator
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Sep 2014 18:19:03 +0000 (20:19 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Sep 2014 18:19:03 +0000 (20:19 +0200)
bash shows an error message if one of the values is empty
as it is trying to do an integer comparison.

src/functions/functions.stp

index 4195ad6e6e37ca4f2e1af3e3227528d515f99864..8fcd281f1e6710fc067b8f0e60d722e8109603c4 100644 (file)
@@ -483,7 +483,7 @@ function stp_port_set_cost() {
        local cost="${3}"
 
        local old_cost="$(stp_port_get_cost "${bridge}" "${port}")"
-       if [ "${cost}" -eq "${old_cost}" ]; then
+       if [ "${cost}" = "${old_cost}" ]; then
                return ${EXIT_OK}
        fi