]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/functions/functions.wpa_supplicant
wpa_supplicant: Move config header generation into own function
[people/stevee/network.git] / src / functions / functions.wpa_supplicant
index ee5b96414073db84ae0223b1456cd8861bb69383..bc82a40ce775c42f64a6dd53040b91407d98278e 100644 (file)
 
 WPA_SUPPLICANT_SOCKET_DIR="${RUN_DIR}/wpa_supplicant/ctrl"
 
+wpa_supplicant_config_header() {
+       config_header "WPA supplicant configuration file"
+
+       # Set control socket directory.
+       print "ctrl_interface=${WPA_SUPPLICANT_SOCKET_DIR}"
+
+       # Honour country
+       if isset country; then
+               print "country=${country}"
+       fi
+
+       print # end of header
+}
+
 wpa_supplicant_config_write() {
        local device="${1}"
        shift