mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
16 lines
491 B
Python
16 lines
491 B
Python
![]() |
from base import Task
|
||
|
from common import phases
|
||
|
import os.path
|
||
|
|
||
|
|
||
|
class EnableDHCPCDDNS(Task):
|
||
|
description = 'Configuring the DHCP client to set the nameservers'
|
||
|
phase = phases.system_modification
|
||
|
|
||
|
def run(self, info):
|
||
|
# The dhcp client that ships with debian sets the DNS servers per default.
|
||
|
# For dhcpcd we need to configure it to do that.
|
||
|
from common.tools import sed_i
|
||
|
dhcpcd = os.path.join(info.root, 'etc/default/dhcpcd')
|
||
|
sed_i(dhcpcd, '^#*SET_DNS=.*', 'SET_DNS=\'yes\'')
|