examples/udhcp/simple.script: print the filename actually changed
authorRolf Eike Beer <eb@emlix.com>
Tue, 13 Aug 2019 15:41:56 +0000 (17:41 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 12 Sep 2019 10:06:46 +0000 (12:06 +0200)
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
examples/udhcp/simple.script

index 29199aa3956e326197f127fbf4eae6473bfda373..6658fbeefadf243de06df0321048983700682a18 100755 (executable)
@@ -53,7 +53,6 @@ case "$1" in
                        done
                fi
 
-               echo "Recreating $RESOLV_CONF"
                # If the file is a symlink somewhere (like /etc/resolv.conf
                # pointing to /run/resolv.conf), make sure things work.
                if test -L "$RESOLV_CONF"; then
@@ -61,6 +60,7 @@ case "$1" in
                        test -e "$RESOLV_CONF" || touch "$RESOLV_CONF"
                fi
                realconf=$(readlink -f "$RESOLV_CONF" 2>/dev/null || echo "$RESOLV_CONF")
+               echo "Recreating $realconf"
                tmpfile="$realconf-$$"
                > "$tmpfile"
                [ -n "$domain" ] && echo "search $domain" >> "$tmpfile"