Sha256: 7a1046da638598b023ce80743c7f6e3cdd0590056cf16722f7e100f34d81a03d
Contents?: true
Size: 691 Bytes
Versions: 4
Compression:
Stored size: 691 Bytes
Contents
module VagrantPlugins module GuestOpenWrt class Guest < Vagrant.plugin("2", :guest) # Name used for guest detection GUEST_DETECTION_NAME = "openwrt".freeze def detect?(machine) machine.communicate.test <<~EOH if test -e /etc/openwrt_release; then exit fi if test -r /etc/os-release; then source /etc/os-release && test 'x#{self.class.const_get(:GUEST_DETECTION_NAME)}' = "x$ID" && exit fi if test -r /etc/banner; then cat /etc/banner | grep -qi '#{self.class.const_get(:GUEST_DETECTION_NAME)}' && exit fi exit 1 EOH end end end end
Version data entries
4 entries across 4 versions & 2 rubygems