Sha256: 960b23699ba24362453d5a2d22ec87a2e3053eb8d94bbe9460efcdbe71552274
Contents?: true
Size: 622 Bytes
Versions: 5
Compression:
Stored size: 622 Bytes
Contents
# frozen_string_literal: true require_relative '../networking' module Facter module Resolvers module Openbsd class Dhcp < Facter::Resolvers::Networking init_resolver class << self def extract_dhcp(interface_name, raw_data, parsed_interface_data) return unless raw_data.match?(/status:\s+active/) result = Facter::Core::Execution.execute("dhcpleasectl -l #{interface_name}", logger: log) parsed_interface_data[:dhcp] = extract_values(result, /\sdhcp server (\S+)/).first unless result.empty? end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems