allow customization of apt-get command, add --force-unsafe-io
This allows the customization of the apt-get command used for installing packages, and also adds '--force-unsafe-io'. Because this is spawned from cloud-init, it seems to make sense as a first boot package installation option.
This commit is contained in:
parent
0753ef964a
commit
2f0ac052dd
@ -47,6 +47,7 @@
|
|||||||
- upstart: cloud-init-nonet.conf trap the TERM signal, so that dmesg or other
|
- upstart: cloud-init-nonet.conf trap the TERM signal, so that dmesg or other
|
||||||
output does not get a 'killed by TERM signal' message.
|
output does not get a 'killed by TERM signal' message.
|
||||||
- support resizing partitions via growpart or parted (LP: #1136936)
|
- support resizing partitions via growpart or parted (LP: #1136936)
|
||||||
|
- allow specifying apt-get command in distro config ('apt_get_command')
|
||||||
|
|
||||||
0.7.1:
|
0.7.1:
|
||||||
- sysvinit: fix missing dependency in cloud-init job for RHEL 5.6
|
- sysvinit: fix missing dependency in cloud-init job for RHEL 5.6
|
||||||
|
@ -33,6 +33,10 @@ from cloudinit.settings import PER_INSTANCE
|
|||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
APT_GET_COMMAND = ('apt-get', '--option=Dpkg::Options::=--force-confold',
|
||||||
|
'--option=Dpkg::options::=--force-unsafe-io',
|
||||||
|
'--assume-yes', '--quiet')
|
||||||
|
|
||||||
|
|
||||||
class Distro(distros.Distro):
|
class Distro(distros.Distro):
|
||||||
hostname_conf_fn = "/etc/hostname"
|
hostname_conf_fn = "/etc/hostname"
|
||||||
@ -150,8 +154,7 @@ class Distro(distros.Distro):
|
|||||||
# See: http://tiny.cc/kg91fw
|
# See: http://tiny.cc/kg91fw
|
||||||
# Or: http://tiny.cc/mh91fw
|
# Or: http://tiny.cc/mh91fw
|
||||||
e['DEBIAN_FRONTEND'] = 'noninteractive'
|
e['DEBIAN_FRONTEND'] = 'noninteractive'
|
||||||
cmd = ['apt-get', '--option', 'Dpkg::Options::=--force-confold',
|
cmd = list(self.get_option("apt_get_command", APT_GET_COMMAND))
|
||||||
'--assume-yes', '--quiet']
|
|
||||||
|
|
||||||
if args and isinstance(args, str):
|
if args and isinstance(args, str):
|
||||||
cmd.append(args)
|
cmd.append(args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user