aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/udhcp/simple.script4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/udhcp/simple.script b/examples/udhcp/simple.script
index 44aa46ece..53974e6d6 100755
--- a/examples/udhcp/simple.script
+++ b/examples/udhcp/simple.script
@@ -55,6 +55,10 @@ case "$1" in
55 echo "Recreating $RESOLV_CONF" 55 echo "Recreating $RESOLV_CONF"
56 # If the file is a symlink somewhere (like /etc/resolv.conf 56 # If the file is a symlink somewhere (like /etc/resolv.conf
57 # pointing to /run/resolv.conf), make sure things work. 57 # pointing to /run/resolv.conf), make sure things work.
58 if test -L "$RESOLV_CONF"; then
59 # If it's a dangling symlink, try to create the target.
60 test -e "$RESOLV_CONF" || touch "$RESOLV_CONF"
61 fi
58 realconf=$(readlink -f "$RESOLV_CONF" 2>/dev/null || echo "$RESOLV_CONF") 62 realconf=$(readlink -f "$RESOLV_CONF" 2>/dev/null || echo "$RESOLV_CONF")
59 tmpfile="$realconf-$$" 63 tmpfile="$realconf-$$"
60 > "$tmpfile" 64 > "$tmpfile"