Skip to content
Browse files

mtr: clarify caveats, style nits

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • 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
View
20 Library/Formula/mtr.rb
@@ -1,28 +1,34 @@
require 'formula'
class Mtr < Formula
- url 'ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz'
homepage 'http://www.bitwizard.nl/mtr/'
+ url 'ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz'
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"]]
end
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"
end
- 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.
+ EOS
end
end

0 comments on commit c51463f

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