From e0831f8b68c9e4c19385380a69a99ea3d7a721a1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 1 Dec 2019 00:10:32 +0100 Subject: [PATCH] Alpine updates - use current dir as working dir - add network config - add hostname --- alpine-rebuild-initramfs.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/alpine-rebuild-initramfs.sh b/alpine-rebuild-initramfs.sh index f197fdc..7d50910 100755 --- a/alpine-rebuild-initramfs.sh +++ b/alpine-rebuild-initramfs.sh @@ -9,7 +9,7 @@ IMAGE=alpine-minirootfs-$MAJOR_VERSION.$MINOR_VERSION-x86_64.tar.gz SSH_KEYS=$(cat ~/.ssh/id_rsa.pub) RESOLVCONF=/etc/resolv.conf -working_directory=$(dirname $0) +working_directory=$(pwd -P) rootfs_tmpdir=$(mktemp -d) rootfs_url="http://dl-cdn.alpinelinux.org/alpine/v$MAJOR_VERSION/releases/x86_64/$IMAGE" @@ -40,12 +40,26 @@ cat $RESOLVCONF > $rootfs_tmpdir/etc/resolv.conf # Make sure init is found by the kernel. run_root ln -s /sbin/init /init +cat > $rootfs_tmpdir/etc/network/interfaces < $rootfs_tmpdir/etc/hostname < "$working_directory/alpine-initramfs.gz")