Created
April 16, 2010 04:29
-
-
Save cncolder/368007 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.open("/etc/bootpd.plist", "r+") do |f| | |
while l = f.gets | |
if l =~ /detect_other_dhcp_server/ | |
puts "disable dhcp detect at line : #{f.lineno}" | |
f.puts "\t<integer>0</integer>\n" | |
end | |
end | |
end | |
pid = `ps -e | grep bootpd | grep -v grep | awk '{print $1}'` | |
puts "tell bootpd reload configure : #{Process.kill('HUP', pid.to_i)}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment