Opened 16 years ago

Closed 16 years ago

Last modified 14 years ago

#12931 closed defect (fixed)

Portfile plist generation support "--restart-netchange" option

Reported by: bdb@… Owned by: macports-tickets@…
Priority: High Milestone: MacPorts 1.6
Component: base Version: 1.5.0
Keywords: Cc: nox@…, bdb@…, ryandesign (Ryan Carsten Schmidt)
Port:

Description

Portfiles for bind9, lighttpd and dhcpd need to generate "--restart-netchange" option into the .plist. Without this option, the daemons may fail to start on some systems. There are two workarounds: i) launchctl unload and then launchctl load, and ii) adding --restart-netchange option to the plist.

See these threads for details:

http://lists.macosforge.org/pipermail/macports-users/2007-June/004011.html http://lists.macosforge.org/pipermail/macports-users/2007-October/006231.html

It appears the fix is required in the MacPorts base system in the portstartupitem.tcl code. I'll preface this with "I don't know tcl" disclaimer... To my eyes it appears that one area of focus for patching startupitem_create_darwin_launchd is in this section of code:

proc startupitem_create_darwin_launchd {args} { ... ... ...

set daemondest LaunchDaemons set itemdir ${prefix}/etc/${daemondest}/${uniquename} set args [list \

"${prefix}/bin/daemondo" \ "--label=${itemname}" \ ]

If "set args [list \..." was modified as follows:

set args [list \

"${prefix}/bin/daemondo" \ "--label=${itemname}" \ "--restart-netchange" ]

then it would probably generate a correct plist for bind9/lighttpd/dhcp/etc but would change ALL plists generated. Therefore it seems a conditional is required to generate the two different forms of plists.

Change History (4)

comment:1 Changed 16 years ago by nox@…

Milestone: MacPorts base bugs

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: bdb@… ryandesign@… added

comment:3 Changed 16 years ago by nox@…

Cc: nox@… added
Milestone: MacPorts base bugsMacPorts base enhancements
Resolution: fixed
Status: newclosed

Added startupitem.netchange boolean flag in r30086.

comment:4 Changed 14 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 1.6
Note: See TracTickets for help on using tickets.