]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/scripts/ipsec-interfaces
ipsec: Log a message when an interface could not be created
[ipfire-2.x.git] / src / scripts / ipsec-interfaces
index 6c39c44a8dbd7dcb8be7a8aff196da9c59838238..4ba2980e57e416e0b4f46d8da964fcf8689512bf 100644 (file)
@@ -84,7 +84,10 @@ main() {
                        # Create a new interface and bring it up
                        else
                                log "Creating interface ${intf}"
-                               ip link add name "${intf}" type "${interface_mode}" "${args[@]}"
+                               if ! ip link add name "${intf}" type "${interface_mode}" "${args[@]}"; then
+                                       log "Could not create interface ${intf}"
+                                       continue
+                               fi
                        fi
 
                        # Add an IP address