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

Last change on this file since 5914 was 5914, checked in by skylar, 4 years ago

actually want to let SSH keys re-generate on boot-up re #993

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