diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-03-07 15:30:38 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-03-07 15:30:38 -0500 |
commit | 6586b35f348ba089bba00e6bebb4ca1b14f41a19 (patch) | |
tree | 475215e6250393a63c8a6f053769a24687de02a4 /cloudinit/distros/debian.py | |
parent | dca9b6c94e10f9f42ad0f129ae6fd38ebb44f4b5 (diff) | |
download | vyos-cloud-init-6586b35f348ba089bba00e6bebb4ca1b14f41a19.tar.gz vyos-cloud-init-6586b35f348ba089bba00e6bebb4ca1b14f41a19.zip |
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.
Diffstat (limited to 'cloudinit/distros/debian.py')
-rw-r--r-- | cloudinit/distros/debian.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py index 1f2848d2..4b779d57 100644 --- a/cloudinit/distros/debian.py +++ b/cloudinit/distros/debian.py @@ -33,6 +33,10 @@ from cloudinit.settings import PER_INSTANCE 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): hostname_conf_fn = "/etc/hostname" @@ -150,8 +154,7 @@ class Distro(distros.Distro): # See: http://tiny.cc/kg91fw # Or: http://tiny.cc/mh91fw e['DEBIAN_FRONTEND'] = 'noninteractive' - cmd = ['apt-get', '--option', 'Dpkg::Options::=--force-confold', - '--assume-yes', '--quiet'] + cmd = list(self.get_option("apt_get_command", APT_GET_COMMAND)) if args and isinstance(args, str): cmd.append(args) |