Don't update when deleting nothing.
authorRoy Marples <roy@marples.name>
Fri, 24 Oct 2014 20:54:58 +0000 (20:54 +0000)
committerRoy Marples <roy@marples.name>
Fri, 24 Oct 2014 20:54:58 +0000 (20:54 +0000)
resolvconf.in

index 1faf2b81f32954e671da8e7a74aaa81afbd3f1e1..d96ce0bee2f53e0eedd4b4c91b0bdf331dd6dd74 100644 (file)
@@ -510,6 +510,17 @@ fi
 if [ ! -d "$IFACEDIR" ]; then
        mkdir -m 0755 -p "$IFACEDIR" || \
                error_exit "Failed to create needed directory $IFACEDIR"
+       if [ "$cmd" = d ]; then
+               # Provide the same error messages as below
+               if ! ${force}; then
+                       cd "$IFACEDIR"
+                       for i in $args; do
+                               warn "No resolv.conf for interface $i"
+                       done
+               fi
+               ${force}
+               exit $?
+       fi
 else
        # Delete any existing information about the interface
        if [ "$cmd" = d ]; then