]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/functions/functions.util
port: ethernet: Correctly create new configurations
[people/ms/network.git] / src / functions / functions.util
index 8831d84b3953c0aca5918bbc3840e6e5f4861edd..1be6dc14cc822d9038cdba7d326f57ab796c2f3f 100644 (file)
@@ -251,7 +251,13 @@ file_get_age() {
 make_directory() {
        local path="${1}"
 
-       mkdir -p "${path}"
+       if ! mkdir -p "${path}"; then
+               log ERROR "Could not create directory ${path}"
+               return ${EXIT_ERROR}
+       fi
+
+       log DEBUG "Created directory ${path}"
+       return ${EXIT_OK}
 }
 
 make_parent_directory() {