From: Michael Tremer Date: Fri, 18 Aug 2017 11:12:41 +0000 (+0000) Subject: Rename make_parent_dir to make_parent_directory X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46954be3e86f6334408eac4d8053938b1bef11a5;p=people%2Fjschlag%2Fnetwork.git Rename make_parent_dir to make_parent_directory Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.db b/src/functions/functions.db index 16f3862..98f253c 100644 --- a/src/functions/functions.db +++ b/src/functions/functions.db @@ -58,7 +58,7 @@ db_set() { log DEBUG "Adding '${key}' = '${value}'" fi - make_parent_dir "${path}" + make_parent_directory "${path}" print "${value}" > "${path}" } diff --git a/src/functions/functions.util b/src/functions/functions.util index 2e76e53..f096fbb 100644 --- a/src/functions/functions.util +++ b/src/functions/functions.util @@ -254,7 +254,7 @@ make_directory() { mkdir -p "${path}" } -make_parent_dir() { +make_parent_directory() { local path="${1}" make_directory "$(dirname "${path}")" diff --git a/src/functions/functions.vpn-security-policies b/src/functions/functions.vpn-security-policies index 435d1bc..d3717a9 100644 --- a/src/functions/functions.vpn-security-policies +++ b/src/functions/functions.vpn-security-policies @@ -1039,7 +1039,7 @@ vpn_security_policies_make_ike_proposal() { local proposal=$(_vpn_security_policies_make_ike_proposal "${name}") # Write proposal to cache - if ! make_parent_dir "${cache_path}" || ! fwrite "${cache_path}" "${proposal}"; then + if ! make_parent_directory "${cache_path}" || ! fwrite "${cache_path}" "${proposal}"; then log WARNING "Could not write to cache: ${cache_path}" fi @@ -1115,7 +1115,7 @@ vpn_security_policies_make_esp_proposal() { local proposal=$(_vpn_security_policies_make_esp_proposal "${name}") # Write proposal to cache - if ! make_parent_dir "${cache_path}" || ! fwrite "${cache_path}" "${proposal}"; then + if ! make_parent_directory "${cache_path}" || ! fwrite "${cache_path}" "${proposal}"; then log WARNING "Could not write to cache: ${cache_path}" fi diff --git a/src/functions/functions.wpa_supplicant b/src/functions/functions.wpa_supplicant index a8240ea..ee5b964 100644 --- a/src/functions/functions.wpa_supplicant +++ b/src/functions/functions.wpa_supplicant @@ -143,7 +143,7 @@ wpa_supplicant_config_write() { esac # Ensure we can write the file - make_parent_dir "${file}" + make_parent_directory "${file}" config_header "WPA supplicant configuration file" > ${file}