mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-04 22:32:49 -04:00
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
18 lines
450 B
Ruby
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
|