summaryrefslogtreecommitdiff
path: root/vmdebootstrap
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-07-04 09:50:37 +0100
committerNeil Williams <codehelp@debian.org>2015-07-04 09:50:37 +0100
commitc476243eafde1e0eda3158f31398b622c8043a9a (patch)
tree3a8d8eafdc5f048a2285017c4c6f53c0ee5b3631 /vmdebootstrap
parent390e883698f85e34433ef79aeabfde77c06b1c22 (diff)
downloadvmdebootstrap-c476243eafde1e0eda3158f31398b622c8043a9a.tar.gz
Specific support for wheezy networking.
Diffstat (limited to 'vmdebootstrap')
-rwxr-xr-xvmdebootstrap9
1 files changed, 8 insertions, 1 deletions
diff --git a/vmdebootstrap b/vmdebootstrap
index 4895147..2e7f9e9 100755
--- a/vmdebootstrap
+++ b/vmdebootstrap
@@ -624,7 +624,14 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
def setup_networking(self, rootdir):
self.message('Setting up networking')
- if not os.path.exists(os.path.join(rootdir, 'etc', 'network', 'interfaces')):
+ # unconditionally write for wheezy (which became oldstable on 04/25/2015)
+ if self.was_oldstable(datetime.date(2015, 4, 26)):
+ with open(os.path.join(
+ rootdir, 'etc', 'network', 'interfaces'), 'w') as netfile:
+ netfile.write('source /etc/network/interfaces.d/*\n')
+ os.mkdir(os.path.join(rootdir, 'etc', 'network', 'interfaces.d'))
+
+ elif not os.path.exists(os.path.join(rootdir, 'etc', 'network', 'interfaces')):
with open(os.path.join(
rootdir, 'etc', 'network', 'interfaces'), 'w') as netfile:
netfile.write('source-directory /etc/network/interfaces.d\n')