mkdir -p is just like install -d
authorRoy Marples <roy@marples.name>
Wed, 23 Dec 2020 20:26:57 +0000 (20:26 +0000)
committerRoy Marples <roy@marples.name>
Wed, 23 Dec 2020 20:26:57 +0000 (20:26 +0000)
resolvconf.in

index ee0cb61c7da00629a17f668a1b9251813c5d0da5..a1a89bfdfdfa01f9fa9acc646d268af9fb8bc1c7 100644 (file)
@@ -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