diff options
| author | Guyzmo | 2012-11-29 20:24:51 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2013-02-02 15:53:31 -0800 |
| commit | 1ef3498d89edad6696609eda36f78db7b26f9f2e (patch) | |
| tree | fd5ddde4190fc48af399b66998b94eb0691a3bd0 /Library/Formula | |
| parent | 42d1e1b8ebb10c3915f4accc266256fd975ad7d2 (diff) | |
| download | homebrew-1ef3498d89edad6696609eda36f78db7b26f9f2e.tar.bz2 | |
tuntaposx 20111101
Closes #16311.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/tuntap.rb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Library/Formula/tuntap.rb b/Library/Formula/tuntap.rb new file mode 100644 index 000000000..450a35fa9 --- /dev/null +++ b/Library/Formula/tuntap.rb @@ -0,0 +1,47 @@ +require 'formula' + +def kext_prefix + prefix/'Library/Extensions' +end + +class Tuntap < Formula + homepage 'http://tuntaposx.sourceforge.net/' + url 'git://git.code.sf.net/p/tuntaposx/code', :tag => 'release_20111101' + version '20111101' + + def install + ENV.j1 # to avoid race conditions (can't open: ../tuntap.o) + cd 'tuntap' do + system "make" + kext_prefix.install "tun.kext", "tap.kext" + prefix.install "startup_item/tap", "startup_item/tun" + end + end + + def caveats + message = <<-EOS.undent + In order for TUN/TAP network devices to work, the tun/tap kernel extensions + must be installed by the root user: + + sudo cp -pR #{kext_prefix}/tap.kext /Library/Extensions/ + sudo cp -pR #{kext_prefix}/tun.kext /Library/Extensions/ + sudo chown -R root:wheel /Library/Extensions/tap.kext + sudo chown -R root:wheel /Library/Extensions/tun.kext + sudo touch /Library/Extensions/ + + To load the extensions at startup, you have to install those scripts too: + + sudo cp -pR #{prefix}/tap /Library/StartupItems/ + sudo cp -pR #{prefix}/tun /Library/StartupItems/ + + If upgrading from a previous version of tuntap, the old kernel extension + will need to be unloaded before performing the steps listed above. First, + check that no tunnel is being activated, disconnect them all and then unload + the kernel extension: + + sudo kextunload -b foo.tun + sudo kextunload -b foo.tap + + EOS + end +end |
