deal with immutable resolv.conf
It is a widespread practice to preserve a custom resolv.conf from being overwritten by DHCP by making the file immutable (chattr +i /etc/resolv.conf). When /usr/share/udhcpc/default.script tries to overwrite an immutable resolv.conf, it fails and leaves behind a file named resolv.conf.$$ where $$ is the PID of the script. In order to avoid these useless files to accumulate, please add the following line to the default.script:
diff --git a/main/busybox/default.script b/main/busybox/default.script
index fd66e830c62..4ecf89f1570 100644
--- a/main/busybox/default.script
+++ b/main/busybox/default.script
@@ -121,6 +121,7 @@ resolvconf() {
done
chmod a+r "$RESOLV_CONF.$$"
mv -f "$RESOLV_CONF.$$" "$RESOLV_CONF"
+ rm -f "$RESOLV_CONF.$$"
}
bound() {
Edited by Kevin Daudt