Refactor ifcfg setup