Skip to content

Commit

Permalink
Correctly apply mode and labels to RHEL network-scripts
Browse files Browse the repository at this point in the history
Fixes #8250
  • Loading branch information
LukeCarrier committed Feb 13, 2017
1 parent 96368d8 commit b676129
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/guests/redhat/cap/configure_networks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@ def self.configure_networks(machine, networks)
# fail if the interface is not actually set up yet so ignore
# errors.
/sbin/ifdown '#{network[:device]}'
# Move new config into place
mv -f '#{remote_path}' '#{final_path}'
# attempt to force network manager to reload configurations
# Apply correct permissions
chown root:root '#{final_path}'
chmod 644 '#{final_path}'
chcon -u system_u -r object_r -t net_conf_t '#{final_path}'
# Attempt to force network manager to reload configurations
nmcli c reload || true
EOH
end
Expand Down

0 comments on commit b676129

Please sign in to comment.