This commit is contained in:
Nico Schottelius 2019-12-14 17:24:25 +01:00
parent 279f86a1f0
commit 3f2dece3f5

View file

@ -16,22 +16,24 @@ outdir=$1; shift
date=$(date +%F)
dir=${outdir}/${suite}-${date}
kernel=kernel-${dir}
initramfs=initramfs-${dir}
basename=${suite}-${date}
dir=${outdir}/${basename}
kernel=${outdir}/kernel-${basename}
initramfs=${outdir}/initramfs-${basename}
keyurl=https://code.ungleich.ch/ungleich-public/__ungleich_staff_ssh_access/raw/master/files
debootstrap "${suite}" "${dir}"
# need non-free for firmware-bnx2
echo 'deb http://pkgmaster.devuan.org/merged ${suite} main contrib non-free' > ${dir}/etc/apt/sources.list
echo "deb http://pkgmaster.devuan.org/merged ${suite} main contrib non-free" > ${dir}/etc/apt/sources.list
chroot ${dir} apt update
chroot ${dir} apt install -y openssh-server rdnssd linux-image-amd64 firmware-bnx2
cp ${dir}/boot/vmlinuz-* ${kernel}
echo '* * * * * root ip -o -6 addr show | grep -E -v 'lo |one' > /etc/issue' > ${dir}/etc/cron.d/ipv6addr
echo '* * * * * root ip -o -6 addr show | grep -E -v ' lo |one' > /etc/issue' > ${dir}/etc/cron.d/ipv6addr
mkdir -p ${dir}/root/.ssh
@ -62,8 +64,6 @@ eof
ifup "\${dev}"
exit 0
EOF
# ensure there is /init in the initramfs -> otherwise there is a kernel panic
@ -71,4 +71,5 @@ EOF
# in our case, they are just the same
ln -s /sbin/init ${dir}/init
# Finally building the initramfs
( cd ${dir} ; find . | cpio -H newc -o | gzip -9 > ${initramfs} )