]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/hooks/ports/wireless-mesh
wpa_supplicant: Drop config helper
[people/stevee/network.git] / src / hooks / ports / wireless-mesh
index a3f07bb8b5f9170dd43da5770198f01e4dee56ba..83c8b756cc52da07db924c1db480ba70ded4c7ee 100644 (file)
@@ -103,11 +103,7 @@ hook_create() {
        fi
 
        # Write WPA supplicant configuration
-       local config_file="$(wpa_supplicant_config_dir "${port}")/wpa_supplicant.conf"
-
-       wpa_supplicant_config_write \
-               "${port}" \
-               "${config_file}" \
+       wpa_supplicant_config_write "${port}" \
                --channel="${CHANNEL}" \
                --key="${PSK}" \
                --mode="802.11s" \
@@ -120,6 +116,9 @@ hook_remove() {
        local port="${1}"
        assert isset port
 
+       # Remove WPA supplicant configuration
+       wpa_supplicant_config_destroy "${port}"
+
        if device_exists "${port}"; then
                wireless_remove "${port}"
        fi