Skip to contentSkip to conversation

pppd: set resolv.conf directory appropiately

PATCH New Gustavo Zacarias 2 participants 2 messages Oct 20, 2014 – Oct 29, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pppd: set resolv.conf directory appropiately

/etc/ppp/resolv.conf might not be writable and it's not useful, switch to standard /etc/resolv.conf
If users don't want to update dns lookup entries they shouldn't use the "userpeerdns" option.

---
 package/pppd/pppd.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/pppd/pppd.mk +7 -0
index eb06eec..384b868 100644
@@ -35,6 +35,13 @@ endef
 
 PPPD_POST_EXTRACT_HOOKS += PPPD_DROP_INTERNAL_IF_PPOL2TP_H
 
+# pppd defaults to /etc/ppp/resolv.conf
+# That might not be writable and definitely not useful
+define PPPD_SET_RESOLV_CONF
+	$(SED) 's,ppp/resolv.conf,resolv.conf,' $(@D)/pppd/pathnames.h
+endef
+PPPD_POST_EXTRACT_HOOKS += PPPD_SET_RESOLV_CONF
+
 define PPPD_CONFIGURE_CMDS
 	$(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux
 	$(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux
Signature · 1 line
2.0.4
#1 lore raw

PATCH 1/1 pppd: set resolv.conf directory appropiately

Dear Gustavo Zacarias,

Quoted 9 lines · Gustavo Zacarias

/etc/ppp/resolv.conf might not be writable and it's not useful, switch to standard /etc/resolv.conf
If users don't want to update dns lookup entries they shouldn't use the "userpeerdns" option.

---
 package/pppd/pppd.mk | 7 +++++++
 1 file changed, 7 insertions(+)

Thanks, applied, after slightly rewording the comment in the code.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com