source: /cluster/svnroot/bccd-ng/branches/skylar/bccd-3.4.0-build_ng/bin/bccd_install_pkgs @ 5997

Last change on this file since 5997 was 5997, checked in by skylar, 3 years ago

install gnupg2 before bccd re for apt-key #1003

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#!/usr/bin/env bash
2
3# $Id: bccd_install_pkgs 5997 2018-02-21 04:33:22Z skylar $
4
5set -eo pipefail
6
7. "${WORKSPACE}"/bccd.conf
8# Get PACKAGES array
9. "${WORKSPACE}"/packages.conf
10
11# gnupg2 is required for apt-key
12/usr/bin/sudo DEBIAN_FRONTEND=noninteractive /usr/sbin/chroot "${WORKSPACE}/debootstrap" apt-get \
13    -o Dpkg::Options::="--force-confnew" \
14    -y install \
15    gnupg2
16
17/usr/bin/sudo WORKSPACE="${WORKSPACE}" /usr/sbin/chroot "${WORKSPACE}/debootstrap" /usr/bin/dpkg --force-confnew -i /tmp/bccd.noarch.deb
18/usr/bin/sudo /usr/sbin/chroot "${WORKSPACE}/debootstrap" apt-get update
19/usr/bin/sudo DEBIAN_FRONTEND=noninteractive /usr/sbin/chroot "${WORKSPACE}/debootstrap" apt-get \
20    -o Dpkg::Options::="--force-confnew" \
21    -y install \
22    ${PACKAGES[@]}
23
24# Clean up and regenerate SSH keys (#993)
25echo "Removing SSH keys in ${WORKSPACE}/debootstrap/etc/ssh" >&2
26/usr/bin/sudo /usr/sbin/chroot "${WORKSPACE}/debootstrap" /usr/bin/find /etc/ssh -type f -name 'ssh*host*key*' -delete -print
27
28# Clean up apt cache (#998)
29echo "Cleaning apt cache" >&2
30/usr/bin/sudo /usr/sbin/chroot "${WORKSPACE}/debootstrap" /usr/bin/apt-get clean
Note: See TracBrowser for help on using the repository browser.