Jessie contains dhcpcd5 instaed of dhcpcd; fixing configuration.

This commit is contained in:
Tomasz Rybak 2014-07-06 19:05:00 +02:00
parent 55c853c348
commit 5433963f4e
2 changed files with 10 additions and 5 deletions

View file

@ -11,7 +11,8 @@ class EnableDHCPCDDNS(Task):
@classmethod
def run(cls, info):
# The dhcp client that ships with debian sets the DNS servers per default.
# For dhcpcd we need to configure it to do that.
# For dhcpcd in Wheezy and earlier we need to configure it to do that.
if info.release_codename in {'jessie', 'sid'}:
from bootstrapvz.common.tools import sed_i
dhcpcd = os.path.join(info.root, 'etc/default/dhcpcd')
sed_i(dhcpcd, '^#*SET_DNS=.*', 'SET_DNS=\'yes\'')

View file

@ -11,7 +11,11 @@ class DefaultPackages(Task):
@classmethod
def run(cls, info):
info.packages.add('file') # Needed for the init scripts
info.packages.add('dhcpcd') # isc-dhcp-client doesn't work properly with ec2
# isc-dhcp-client doesn't work properly with ec2
if info.release_codename in {'jessie', 'sid'}:
info.packages.add('dhcpcd5')
else:
info.packages.add('dhcpcd')
info.exclude_packages.add('isc-dhcp-client')
info.exclude_packages.add('isc-dhcp-common')