Commit 94b890be authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Thomas Petazzoni
Browse files

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.

[Thomas: slightly reword the comment in the code.]

Signed-off-by: default avatarGustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 17a74d47
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -35,6 +35,15 @@ endef

PPPD_POST_EXTRACT_HOOKS += PPPD_DROP_INTERNAL_IF_PPOL2TP_H

# pppd defaults to /etc/ppp/resolv.conf, which not be writable and is
# definitely not useful since the C library only uses
# /etc/resolv.conf. Therefore, we change pppd to use /etc/resolv.conf
# instead.
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