blob: c3fa98ce198cf524d3233180b9236e749634fed8 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
 | require "requirement"
class TuntapDependency < Requirement
  fatal true
  default_formula "tuntap"
  cask "tuntap"
  satisfy { self.class.binary_tuntap_installed? || Formula["tuntap"].installed? }
  def self.binary_tuntap_installed?
    File.exist?("/Library/Extensions/tun.kext") && File.exist?("/Library/Extensions/tap.kext")
    File.exist?("/Library/LaunchDaemons/net.sf.tuntaposx.tun.plist")
    File.exist?("/Library/LaunchDaemons/net.sf.tuntaposx.tap.plist")
  end
end
 |