You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gennet/alpine_postinst

24 lines
726 B
Plaintext

#!/bin/echo Run this in VM.
# Add SSH keys
# Change key to your liking
ssh_key='ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEDFA6Jfr0Y1UZSlSiYnwxHyEpDM9F3s/NinQzzGMGuw'
mkdir /root/.ssh
chmod 700 /root/.ssh
echo "$ssh_key" >> /root/.ssh/authorized_keys
# Install bird and maybe other tools
2 years ago
apk update
apk add bird iproute2
2 years ago
rc-update add bird default
# DNS setup
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "nameserver 2620:fe::fe" >> /etc/resolv.conf
# Run nameif at boot to set network names
# Doc: https://wiki.alpinelinux.org/wiki/Custom_network_interface_names
# NOTE: This does not seem to work.
#echo '-SUBSYSTEM=net;DEVPATH=.*/net/.*;.* root:root 600 @/sbin/nameif -s' >> /etc/mdev.conf
#mkinitfs $(ls /lib/modules)