From fdf1fa6b7aa573934e06cbf48ce26e1460ef9d16 Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Fri, 8 Jun 2018 13:16:19 +0800 Subject: [PATCH] Add -q to apt-get calls --- cache/Dockerfile | 2 +- cache/Vagrantfile | 6 +++--- http/hyperv/packages.cfg | 2 +- provisioning/en/provisioner.sh | 2 +- scripts/apt.sh | 6 +++--- scripts/cleanup.sh | 4 ++-- scripts/debian/vmware.sh | 2 +- scripts/ubuntu/vmware.sh | 2 +- scripts/ubuntu/zfs.sh | 6 ++---- scripts/vbox.sh | 3 +-- scripts/zfs.sh | 6 ++---- xenial/hyperv/provisioner.jsonnet | 18 +++++++++--------- 12 files changed, 27 insertions(+), 32 deletions(-) diff --git a/cache/Dockerfile b/cache/Dockerfile index 6f889f7..8bf1827 100644 --- a/cache/Dockerfile +++ b/cache/Dockerfile @@ -10,7 +10,7 @@ FROM ubuntu VOLUME ["/var/cache/apt-cacher-ng"] -RUN apt-get update && apt-get install -y apt-cacher-ng +RUN apt-get -q update && apt-get -q install -y apt-cacher-ng EXPOSE 3142 CMD chmod 777 /var/cache/apt-cacher-ng && /etc/init.d/apt-cacher-ng start && tail -f /var/log/apt-cacher-ng/* diff --git a/cache/Vagrantfile b/cache/Vagrantfile index cd22d3e..9ff51bc 100644 --- a/cache/Vagrantfile +++ b/cache/Vagrantfile @@ -16,9 +16,9 @@ Vagrant.configure("2") do |config| end config.vm.provision "shell", inline: <<-SHELL - DEBIAN_FRONTEND=noninteractive apt-get update - DEBIAN_FRONTEND=noninteractive apt-get upgrade -y - DEBIAN_FRONTEND=noninteractive apt-get install apt-cacher-ng + DEBIAN_FRONTEND=noninteractive apt-get -q update + DEBIAN_FRONTEND=noninteractive apt-get -q upgrade -y + DEBIAN_FRONTEND=noninteractive apt-get -q -y install apt-cacher-ng if [ -f /home/vagrant/apt-cacher-ng.tgz ]; then cd /var/cache diff --git a/http/hyperv/packages.cfg b/http/hyperv/packages.cfg index 75c6fe7..6b481c0 100644 --- a/http/hyperv/packages.cfg +++ b/http/hyperv/packages.cfg @@ -1,7 +1,7 @@ # Additional packages for Hyper-V d-i pkgsel/include string openssh-server ntp curl net-tools dnsutils linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils -d-i preseed/late_command string in-target apt-get install -y --install-recommends linux-virtual-lts-xenial linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial; +d-i preseed/late_command string in-target apt-get -q install -y --install-recommends linux-virtual-lts-xenial linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial; d-i grub-installer/force-efi-extra-removable boolean true # Change boot diff --git a/provisioning/en/provisioner.sh b/provisioning/en/provisioner.sh index 57b65a0..ec3954d 100644 --- a/provisioning/en/provisioner.sh +++ b/provisioning/en/provisioner.sh @@ -70,7 +70,7 @@ else echo "Installing $CMD ..." echo >> /etc/apt/sources.list echo "deb http://deb.subutai.io/subutai $ENV main" | tee --append /etc/apt/sources.list - DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install subutai + DEBIAN_FRONTEND=noninteractive apt-get -q update && DEBIAN_FRONTEND=noninteractive apt-get -q -y install subutai cmd_path="$(which $CMD)" fi diff --git a/scripts/apt.sh b/scripts/apt.sh index e397436..71f0390 100755 --- a/scripts/apt.sh +++ b/scripts/apt.sh @@ -1,13 +1,13 @@ #!/bin/bash echo Updating from repositories ... -sudo DEBIAN_FRONTEND=noninteractive apt-get -y update +sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y update echo Upgrading distribution ... -sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade +sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y dist-upgrade echo Adding needed packages ... -sudo DEBIAN_FRONTEND=noninteractive apt-get -y install net-tools inotify-tools +sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install net-tools inotify-tools diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index f3bc51d..52bf2de 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -5,7 +5,7 @@ if [ -z "$BRANCHTAG" ]; then exit -1 fi -DEBIAN_FRONTEND=noninteractive apt-get -y autoremove +DEBIAN_FRONTEND=noninteractive apt-get -q -y autoremove # seems this is removing everything we install #sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo DEBIAN_FRONTEND=noninteractive apt-get -y purge @@ -20,7 +20,7 @@ fi echo "Replacing /etc/apt/sources.list with standard sources" cp /tmp/sources.list /etc/apt/sources.list -DEBIAN_FRONTEND=noninteractive apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -q update echo "Setting ulimit -n 65535 in /etc/profile" sed -i '1 i\ulimit -n 65535' /etc/profile diff --git a/scripts/debian/vmware.sh b/scripts/debian/vmware.sh index 9faa4ee..f8ee08c 100644 --- a/scripts/debian/vmware.sh +++ b/scripts/debian/vmware.sh @@ -1,7 +1,7 @@ #!/bin/sh -eux # install open-vm-tools -DEBIAN_FRONTEND=noninteractive apt-get install -y open-vm-tools; +DEBIAN_FRONTEND=noninteractive apt-get -q install -y open-vm-tools; # set a default HOME_DIR environment variable if not set HOME_DIR="${HOME_DIR:-/home/subutai}"; diff --git a/scripts/ubuntu/vmware.sh b/scripts/ubuntu/vmware.sh index 0e643ed..f21aeeb 100644 --- a/scripts/ubuntu/vmware.sh +++ b/scripts/ubuntu/vmware.sh @@ -1,5 +1,5 @@ #!/bin/sh -eux -DEBIAN_FRONTEND=noninteractive apt-get install -y open-vm-tools; +DEBIAN_FRONTEND=noninteractive apt-get -q install -y open-vm-tools; mkdir /mnt/hgfs; echo "platform specific vmware.sh executed"; diff --git a/scripts/ubuntu/zfs.sh b/scripts/ubuntu/zfs.sh index b9372f2..f7fa424 100644 --- a/scripts/ubuntu/zfs.sh +++ b/scripts/ubuntu/zfs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -DEBIAN_FRONTEND=noninteractive apt-get -y install zfsutils-linux +DEBIAN_FRONTEND=noninteractive apt-get -q -y install zfsutils-linux /sbin/modprobe zfs @@ -10,9 +10,7 @@ zfs create -o mountpoint="/var/lib/lxc" subutai/fs zpool set autoexpand=on subutai -DEBIAN_FRONTEND=noninteractive apt-get -y install lxc - -DEBIAN_FRONTEND=noninteractive apt-get -y install dirmngr +DEBIAN_FRONTEND=noninteractive apt-get -q -y install lxc dirmngr apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C6B2AC7FBEB649F1 diff --git a/scripts/vbox.sh b/scripts/vbox.sh index 7ea3aa0..83b7839 100755 --- a/scripts/vbox.sh +++ b/scripts/vbox.sh @@ -2,8 +2,7 @@ echo "==> Installing VirtualBox guest additions" # Assuming the following packages are installed -DEBIAN_FRONTEND=noninteractive apt-get install -y linux-headers-$(uname -r) build-essential perl -DEBIAN_FRONTEND=noninteractive apt-get install -y dkms +DEBIAN_FRONTEND=noninteractive apt-get -q install -y linux-headers-$(uname -r) build-essential perl dkms VBOX_VERSION=$(cat /home/${SSH_USERNAME}/.vbox_version) mount -o loop /home/${SSH_USERNAME}/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt diff --git a/scripts/zfs.sh b/scripts/zfs.sh index be00839..7d6c1d7 100644 --- a/scripts/zfs.sh +++ b/scripts/zfs.sh @@ -1,6 +1,6 @@ #!/bin/bash -DEBIAN_FRONTEND=noninteractive apt-get -y install zfsutils +DEBIAN_FRONTEND=noninteractive apt-get -q -y install zfsutils /sbin/modprobe zfs @@ -10,9 +10,7 @@ zfs create -o mountpoint="/var/lib/lxc" subutai/fs zpool set autoexpand=on subutai -DEBIAN_FRONTEND=noninteractive apt-get -y install lxc - -DEBIAN_FRONTEND=noninteractive apt-get -y install dirmngr +DEBIAN_FRONTEND=noninteractive apt-get -q -y install lxc dirmngr apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C6B2AC7FBEB649F1 diff --git a/xenial/hyperv/provisioner.jsonnet b/xenial/hyperv/provisioner.jsonnet index 67eb9ba..74fbee1 100644 --- a/xenial/hyperv/provisioner.jsonnet +++ b/xenial/hyperv/provisioner.jsonnet @@ -5,13 +5,13 @@ "echo 'subutai ALL=NOPASSWD: ALL' >> /etc/sudoers", "date > /home/{{user `ssh_username`}}/vagrant_box_build_time", "echo Updating from repositories ...", - "DEBIAN_FRONTEND=noninteractive apt-get -y update", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y update", "echo Upgrading distribution ...", - "DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y dist-upgrade", "echo Adding needed packages ...", - "DEBIAN_FRONTEND=noninteractive apt-get -y install net-tools inotify-tools", - "DEBIAN_FRONTEND=noninteractive apt-get -y install linux-cloud-tools-$(uname -r)", - "DEBIAN_FRONTEND=noninteractive apt-get -y install linux-virtual-lts-xenial linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y install net-tools inotify-tools", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y install linux-cloud-tools-$(uname -r)", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y install linux-virtual-lts-xenial linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial", "echo \"{{user `ssh_username`}} ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers.d/{{user `ssh_username`}}", "chmod 440 /etc/sudoers.d/{{user `ssh_username`}}", "mkdir -pm 700 /home/{{user `ssh_username`}}/.ssh", @@ -19,15 +19,15 @@ "chmod 0600 /home/{{user `ssh_username`}}/.ssh/authorized_keys", "chown -R {{user `ssh_username`}}:{{user `ssh_username`}} /home/{{user `ssh_username`}}/.ssh", "cp /tmp/sources.list /etc/apt/sources.list", - "DEBIAN_FRONTEND=noninteractive apt-get update", + "DEBIAN_FRONTEND=noninteractive apt-get -q update", "sed -i '1 i\\ulimit -n 65535' /etc/profile", - "DEBIAN_FRONTEND=noninteractive apt-get -y install zfsutils-linux", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y install zfsutils-linux", "/sbin/modprobe zfs", "zpool create -f subutai /dev/mapper/main-zfs", "zfs create -o mountpoint=\"/var/lib/lxc\" subutai/fs", "zpool set autoexpand=on subutai", - "DEBIAN_FRONTEND=noninteractive apt-get -y install lxc", - "DEBIAN_FRONTEND=noninteractive apt-get -y install dirmngr", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y install lxc", + "DEBIAN_FRONTEND=noninteractive apt-get -q -y install dirmngr", "apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C6B2AC7FBEB649F1" ] }