Merge pull request #118 from rybaktomasz/dhcpcd-unstable

Choose installed dhcpcd version in Wheezy and Jessie
This commit is contained in:
Anders Ingemann 2014-07-06 20:34:03 +02:00
commit 7933992138
2 changed files with 10 additions and 5 deletions

View file

@ -11,10 +11,11 @@ class EnableDHCPCDDNS(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
# The dhcp client that ships with debian sets the DNS servers per default. # 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.
from bootstrapvz.common.tools import sed_i if info.release_codename not in {'jessie', 'sid'}:
dhcpcd = os.path.join(info.root, 'etc/default/dhcpcd') from bootstrapvz.common.tools import sed_i
sed_i(dhcpcd, '^#*SET_DNS=.*', 'SET_DNS=\'yes\'') dhcpcd = os.path.join(info.root, 'etc/default/dhcpcd')
sed_i(dhcpcd, '^#*SET_DNS=.*', 'SET_DNS=\'yes\'')
class AddBuildEssentialPackage(Task): class AddBuildEssentialPackage(Task):

View file

@ -11,7 +11,11 @@ class DefaultPackages(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
info.packages.add('file') # Needed for the init scripts 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-client')
info.exclude_packages.add('isc-dhcp-common') info.exclude_packages.add('isc-dhcp-common')