diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/GLIArchitectureTemplate.py | 6 |
2 files changed, 8 insertions, 2 deletions
@@ -2,6 +2,10 @@ # Copyright 2005-2008 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 06 Apr 2008; Andrew Gaffney <agaffney@gentoo.org> + src/GLIArchitectureTemplate.py: + Update post-install networking config to use newer conf.d/net syntax + 05 Apr 2008; Andrew Gaffney <agaffney@gentoo.org> src/GLIArchitectureTemplate.py: run sed on copied make.conf to remove lines that start with ## diff --git a/src/GLIArchitectureTemplate.py b/src/GLIArchitectureTemplate.py index 88cd94c..7c7f461 100644 --- a/src/GLIArchitectureTemplate.py +++ b/src/GLIArchitectureTemplate.py @@ -1198,7 +1198,7 @@ class ArchitectureTemplate: # alias_netmasks = [] # Write the static ip config to /etc/conf.d/net - self._edit_config(self._chroot_dir + "/etc/conf.d/net", {"iface_" + interface: ip + " broadcast " + broadcast + " netmask " + netmask}) + self._edit_config(self._chroot_dir + "/etc/conf.d/net", {"config_" + interface: '( "' + ip + " netmask " + netmask + " broadcast " + broadcast + '" )'}, quotes_around_value=False) # If aliases are set # if aliases: @@ -1224,7 +1224,9 @@ class ArchitectureTemplate: dhcpcd_options = interfaces[interface][1] if not dhcpcd_options: dhcpcd_options = "" - self._edit_config(self._chroot_dir + "/etc/conf.d/net", {"iface_" + interface: "dhcp", "dhcpcd_" + interface: dhcpcd_options}) + self._edit_config(self._chroot_dir + "/etc/conf.d/net", {"config_" + interface: '( "dhcp" )'}, quotes_around_value=False) + if dhcpcd_options: + self._edit_config(self._chroot_dir + "/etc/conf.d/net", {"dhcpcd_" + interface: dhcpcd_options}) emerge_dhcp = True if emerge_dhcp: if self._debug: self._logger.log("DEBUG: setup_network_post(): emerging dhcpcd.") |