From 3f2dece3f5bf566712a084ccee766427e6d7c1c8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 14 Dec 2019 17:24:25 +0100 Subject: [PATCH] ++update --- debian-devuan-netboot.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/debian-devuan-netboot.sh b/debian-devuan-netboot.sh index 6fdeecb..0d366fa 100755 --- a/debian-devuan-netboot.sh +++ b/debian-devuan-netboot.sh @@ -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} )