Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#6474 closed defect (fixed)

/tmp/ not created for ppp connections without peerdns

Reported by: MichaelPloujnikov <ploujj@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:


Basically, if I have the following in /etc/config/network:

	option peerdns 0
	option dns	''

/tmp/ isn't generated with the hard-coded nameservers when I restart my pppoe connection. See this thread for more details:

As that post says, my solution is to add this code to /lib/network/

Index: package/ppp/files/
--- package/ppp/files/	(revision 19085)
+++ package/ppp/files/	(working copy)
@@ -54,6 +54,14 @@
 	config_get_bool peerdns "$cfg" peerdns 1 
 	[ "$peerdns" -eq 1 ] && peerdns="usepeerdns" || peerdns="" 
+	config_get dns "$config" dns
+	[ -z "$dns" ] || {
+		for ns in $dns; do
+			grep "$ns" /tmp/ 2>/dev/null >/dev/null || {
+				echo "nameserver $ns" >> /tmp/
+			}
+		done
+	}
 	config_get demand "$cfg" demand
 	[ -n "$demand" ] && echo "nameserver" > /tmp/

This works for me, but maybe it needs some kind of clean up and protection from race conditions with other code that might generate /tmp/

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r19093

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.