diff options
Diffstat (limited to 'Library/Formula/isc-dhcp.rb')
| -rw-r--r-- | Library/Formula/isc-dhcp.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Library/Formula/isc-dhcp.rb b/Library/Formula/isc-dhcp.rb index e857b63ed..8e480bb59 100644 --- a/Library/Formula/isc-dhcp.rb +++ b/Library/Formula/isc-dhcp.rb @@ -71,30 +71,30 @@ class IscDhcp < Formula end # sample launchd plists - (prefix+'org.isc.dhcpd.plist').write dhcpd_plist - (prefix+'org.isc.dhcpd.plist').chmod 0644 - (prefix+'org.isc.dhcpd6.plist').write dhcpd6_plist - (prefix+'org.isc.dhcpd6.plist').chmod 0644 + plist_path.write dhcpd_plist + plist_path.chmod 0644 + (prefix+'homebrew.mxcl.dhcpd6.plist').write dhcpd6_plist + (prefix+'homebrew.mxcl.dhcpd6.plist').chmod 0644 end def caveats <<-EOCAVEATS.undent - This install of dhcpd expects config files to be in /usr/local/etc. - All state files (leases and pids) are stored in /usr/local/var/dhcpd. + This install of dhcpd expects config files to be in #{etc}. + All state files (leases and pids) are stored in #{var}/dhcpd. Dhcpd needs to run as root since it listens on privileged ports. Sample launchd plists to achieve this have been provided at: - #{prefix}/org.isc.dhcpd.plist + #{plist_path} and: - #{prefix}/org.isc.dhcpd6.plist + #{prefix}/homebrew.mxcl.dhcpd6.plist There are two plists because a single dhcpd process may do either DHCPv4 or DHCPv6 but not both. Use one or both as needed. Copy the plists to /Library/LaunchDaemons and start the services with cd /Library/LaunchDaemons - launchctl load -w org.isc.dhcpd.plist - launchctl load -w org.isc.dhcpd6.plist + launchctl load -w #{plist_path.basename} + launchctl load -w homebrew.mxcl.dhcpd6.plist Note that you must create the appropriate config files before starting the services or dhcpd will refuse to run. @@ -103,8 +103,8 @@ class IscDhcp < Formula Sample config files may be found in #{etc}. If you change the config, restart dhcpd with one or both of - launchctl stop org.isc.dhcpd - launchctl stop org.isc.dhcpd6 + launchctl stop #{plist_name} + launchctl stop homebrew.mxcl.dhcpd6 EOCAVEATS end @@ -115,7 +115,7 @@ class IscDhcp < Formula "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version='1.0'> <dict> - <key>Label</key><string>org.isc.dhcpd</string> + <key>Label</key><string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{HOMEBREW_PREFIX}/sbin/dhcpd</string> @@ -137,7 +137,7 @@ class IscDhcp < Formula "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version='1.0'> <dict> - <key>Label</key><string>org.isc.dhcpd</string> + <key>Label</key><string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{HOMEBREW_PREFIX}/sbin/dhcpd</string> |
