#!/bin/sh # Nico Schottelius, 2019-12-09 date=$(date +%F) suite=ascii dir=${suite}-${date} kernel=${dir}-kernel keyurl=https://code.ungleich.ch/ungleich-public/__ungleich_staff_ssh_access/raw/master/files debootstrap "${suite}" "${dir}" chroot ${dir} apt install -y openssh-server rdnssd linux-image-amd64 cat > ${dir}/etc/network/interfaces << EOF auto lo iface lo inet loopback auto eth0 iface eth0 inet6 auto EOF mv ${dir}/boot/vmlinuz-* ${kernel} rm ${dir}/boot/initrd* mkdir -p ${dir}/root/.ssh for key in balazs dominique jinguk nico; do curl -s ${keyurl}/${key}.pub >> ${dir}/root/.ssh/authorized_keys done ( cd ${dir} ; find . | cpio -H newc -o | gzip -9 > ../${dir}-initramfs )