summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-12-23 20:26:57 +0000
committerRoy Marples <roy@marples.name>2020-12-23 20:26:57 +0000
commite94e8b990f50e4f25bad0831def1eaf35f7bd31d (patch)
tree93046397cfa9a48223fa2045426fee7c9f24f381
parentbf49129e321d4b0876798f6ef40f77ef180f586c (diff)
downloadopenresolv-e94e8b990f50e4f25bad0831def1eaf35f7bd31d.tar.xz
mkdir -p is just like install -d
-rw-r--r--resolvconf.in9
1 files changed, 2 insertions, 7 deletions
diff --git a/resolvconf.in b/resolvconf.in
index ee0cb61..a1a89bf 100644
--- a/resolvconf.in
+++ b/resolvconf.in
@@ -275,19 +275,14 @@ dirname()
config_mkdirs()
{
- e=0
for f; do
[ -n "$f" ] || continue
d="$(dirname "$f")"
if [ ! -d "$d" ]; then
- if type install >/dev/null 2>&1; then
- install -d "$d" || e=$?
- else
- mkdir "$d" || e=$?
- fi
+ mkdir -p "$d" || return $?
fi
done
- return $e
+ return 0
}
# With the advent of alternative init systems, it's possible to have