Method: HelperClasses::Platform#net_status
- Defined in:
- lib/helper_classes/platform.rb
#net_status(iface, dev) ⇒ Object
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/helper_classes/platform.rb', line 138 def net_status(iface, dev) case @system when :ArchLinux return System.run_str("netctl status #{iface} | grep Active") =~ /: active/ when :Ubuntu return System.run_str("ifconfig | grep #{dev}") != '' else return false end end |