From 704f2dab7c35bc4c83e4527a22e8a5025fdc4e8e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 1 Dec 2019 01:18:21 +0100 Subject: [PATCH] add udev-trigger for loading the network card --- alpine-rebuild-initramfs.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/alpine-rebuild-initramfs.sh b/alpine-rebuild-initramfs.sh index d9dfab9..643cc3f 100755 --- a/alpine-rebuild-initramfs.sh +++ b/alpine-rebuild-initramfs.sh @@ -40,25 +40,38 @@ cat "$RESOLVCONF" > $rootfs_tmpdir/etc/resolv.conf # Make sure init is found by the kernel. run_root ln -s /sbin/init /init +# Servers have static addresses, disable the standard +# alpine setting of using tempaddr = 2 +cat > "$rootfs_tmpdir/etc/sysctl.d/99-ipv6.conf" < "$rootfs_tmpdir/etc/network/interfaces" <> /etc/issue + post-up echo post post up >> /etc/issue EOF cat > "$rootfs_tmpdir/etc/hostname" <> "$rootfs_tmpdir/etc/modules" + # Layer atop base rootfs. run_root apk update run_root apk upgrade run_root apk add openssh linux-vanilla openrc udev run_root rc-update add udev +run_root rc-update add udev-trigger run_root rc-update add sshd run_root rc-update add networking run_root rc-update add hostname @@ -71,7 +84,7 @@ run_root rc-update add hostname cp "$rootfs_tmpdir/boot/vmlinuz-vanilla" "$working_directory/alpine-kernel" # Cleanup. -rm -r "$rootfs_tmpdir" +#rm -r "$rootfs_tmpdir" # Upload to netboot server. - needs to be done outside sudo echo "Use alpine-initramfs.gz alpine-kernel from $working_directory"!