Opened 11 years ago

Closed 11 years ago

Last modified 3 years ago

#895 closed defect (fixed)

Bug in lock / pppd check to prevent duplicate pppd instances for pppoe

Reported by: anonymous Owned by: nico
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version:
Keywords: kamikaze duplicate pppd Cc:


On a WGT634U I still got 2 ppp daemons and two ppp interfaces with
trunk r5301. The reason is, that assumes a pid in
/var/run/ppp-${cfg}.pid, but the file contains a pid an the ppp
interface name.

This patch fixed it for me:

--- trunk/package/ppp/files/ 2006-10-26 13:20:55.000000000 +0200
+++ trunk/package/ppp/files/      2006-10-30 10:46:07.000000000 +0100
@@ -10,7 +10,7 @@
        # make sure only one pppd process is started
        lock "/var/lock/ppp-${cfg}"
-       local pid="$(cat /var/run/ppp-${cfg}.pid 2>/dev/null)"
+       local pid="$(head -1 /var/run/ppp-${cfg}.pid 2>/dev/null)"
        [ -d "/proc/$pid" ] && grep pppd "/proc/$pid/cmdline" 2>/dev/null >/dev/null && {
                lock -u "/var/lock/ppp-${cfg}"
                return 0

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by nico

  • Owner changed from developers to nico
  • Status changed from new to assigned

comment:2 Changed 11 years ago by nbd

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

added in [5577]

comment:3 Changed 3 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.