examples/udhcp/simple.script: fix resolv.conf update if it is a dangling symlink
authorRolf Eike Beer <eb@emlix.com>
Thu, 28 Mar 2019 14:29:29 +0000 (15:29 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 13 Apr 2019 14:58:00 +0000 (16:58 +0200)
commit7180d9ed863e6ea350938b13384548f4f2617528
treee6f7216d2219f243379796b72d52f3bf76e32b19
parent0e7bd69bb58e0914f25e3543e6beb142a203738c
examples/udhcp/simple.script: fix resolv.conf update if it is a dangling symlink

If /etc/resolv.conf is a symlink to a tmpfs and the actual file does not
already exist, "readlink -f" will not detect it as symlink. Explicitely check
for that condition before and touch the file, making the other code work as
intended.

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
examples/udhcp/simple.script