example: actually chmod new resolv.conf after overwriting
authorSteven Barth <steven@midlink.org>
Wed, 15 Apr 2015 13:02:55 +0000 (15:02 +0200)
committerSteven Barth <steven@midlink.org>
Wed, 15 Apr 2015 13:02:55 +0000 (15:02 +0200)
Signed-off-by: Steven Barth <steven@midlink.org>
odhcp6c-example-script.sh

index a1fb0fc..00d8056 100755 (executable)
@@ -12,6 +12,7 @@ update_resolv() {
                        echo "nameserver $c #odhcp6c:$device:" >> /tmp/resolv.conf.tmp
                done
                mv /tmp/resolv.conf.tmp /etc/resolv.conf
+               chmod 0644 /etc/resolv.conf
        ) 9>/tmp/resolv.conf.lock
        rm -f /tmp/resolv.conf.lock /tmp/resolv.conf.tmp
 }