aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2008-04-06 16:55:22 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2008-04-06 16:55:22 +0000
commita773fd3b7a8f393f981a7c8bf2e93a060374cc66 (patch)
treec6c1c8d30d1394075a93ff7260de19abe40284b0
parentrun sed on copied make.conf to remove lines that start with ## (diff)
downloadgli-a773fd3b7a8f393f981a7c8bf2e93a060374cc66.tar.gz
gli-a773fd3b7a8f393f981a7c8bf2e93a060374cc66.tar.bz2
gli-a773fd3b7a8f393f981a7c8bf2e93a060374cc66.zip
Update post-install networking config to use newer conf.d/net syntax
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1891 f8877401-5920-0410-a79b-8e2d7e04ca0d
-rw-r--r--ChangeLog4
-rw-r--r--src/GLIArchitectureTemplate.py6
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 097498f..22134f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.")