Quickly set the current DHCP address as static in RHEL 7

Door MtC op vrijdag 10 maart 2017 15:06 - Reacties (3)
Categorie: scripting, Views: 823

I couldn't think of a way to quickly (scripted) set the current DHCP address as a static address in RHEL 7, so I created my own script.

The script uses the parameters in nmcli dev to pre-populate new parameters. It creates a basic config.

Script can be found at https://github.com/Blizzkid/nic-set-static. Contributors are warmly welcomed.