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")