Skip to content
Browse files

mtr: clarify caveats, style nits

Signed-off-by: Jack Nagel <>
  • Loading branch information...
1 parent c7f5e7d commit c51463f8c0af781832e7f2af432981d5fe45a11e @jacknagel jacknagel committed
Showing with 13 additions and 7 deletions.
  1. +13 −7 Library/Formula/mtr.rb
20 Library/Formula/mtr.rb
@@ -1,28 +1,34 @@
require 'formula'
class Mtr < Formula
- url ''
homepage ''
+ url ''
sha1 'f1319de27324d85898a9df0a293a438bbaaa12b5'
depends_on 'gtk+' unless ARGV.include? "--no-gtk"
def options
- [
- ['--no-gtk', "Don't build with Gtk+ support"]
- ]
+ [['--no-gtk', "Don't build with Gtk+ support"]]
def install
# We need to add this because nameserver8_compat.h has been removed in Snow Leopard
ENV['LIBS'] = "-lresolv"
- args = ["--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"]
+ args = %W[--prefix=#{prefix} --disable-dependency-tracking]
args << "--without-gtk" if ARGV.include? "--no-gtk"
system "./configure", *args
system "make install"
- def caveats
- "Run mtr sudo'd in order to avoid the error: `unable to get raw sockets'"
+ def caveats; <<-EOS.undent
+ mtr requires superuser privileges. You can either run the program
+ via `sudo`, or change its ownership to root and set the setuid bit:
+ sudo chown root:wheel #{sbin}/mtr
+ sudo chmod u+s #{sbin}/mtr
+ In any case, you should be certain that you trust the software you
+ are executing with elevated privileges.

0 comments on commit c51463f

Please sign in to comment.
Something went wrong with that request. Please try again.