vagrant/plugins/guests/redhat/cap/network_scripts_dir.rb
Chris Roberts 75726b112a
Update RHEL guest networking
Recent versions of RHEL based guests have updated network configuration.
Detect the correct location of the network configuration files, and
configure the guest based on the detected location.

Fixes #13616
2025-03-19 17:42:11 -07:00

18 lines
450 B
Ruby

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
module VagrantPlugins
module GuestRedHat
module Cap
class NetworkScriptsDir
def self.network_scripts_dir(machine)
if machine.communicate.test("test -d /etc/sysconfig/network-scripts")
"/etc/sysconfig/network-scripts"
else
"/etc/NetworkManager/system-connections"
end
end
end
end
end
end