mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-07 17:40:30 +00:00
Run apt-get upgrade before we remove resolv.conf
This way we can still resolve domain names even when running chrooted
This commit is contained in:
parent
7a93002b2d
commit
2fd8e643fc
1 changed files with 4 additions and 2 deletions
|
@ -1,8 +1,9 @@
|
||||||
from base import Task
|
from base import Task
|
||||||
from common import phases
|
from common import phases
|
||||||
from common.tools import log_check_call
|
from common.tools import log_check_call
|
||||||
|
import network
|
||||||
|
import locale
|
||||||
import os
|
import os
|
||||||
from locale import GenerateLocale
|
|
||||||
|
|
||||||
|
|
||||||
class AptSources(Task):
|
class AptSources(Task):
|
||||||
|
@ -41,7 +42,8 @@ class DisableDaemonAutostart(Task):
|
||||||
class AptUpgrade(Task):
|
class AptUpgrade(Task):
|
||||||
description = 'Upgrading packages and fixing broken dependencies'
|
description = 'Upgrading packages and fixing broken dependencies'
|
||||||
phase = phases.system_modification
|
phase = phases.system_modification
|
||||||
after = [GenerateLocale, AptSources, DisableDaemonAutostart]
|
before = [network.RemoveDNSInfo]
|
||||||
|
after = [locale.GenerateLocale, AptSources, DisableDaemonAutostart]
|
||||||
|
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
log_check_call(['/usr/sbin/chroot', info.root, '/usr/bin/apt-get', 'update'])
|
log_check_call(['/usr/sbin/chroot', info.root, '/usr/bin/apt-get', 'update'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue