add udev-trigger for loading the network card
This commit is contained in:
parent
080922ac39
commit
704f2dab7c
1 changed files with 15 additions and 2 deletions
|
@ -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" <<EOF
|
||||
net.ipv6.conf.default.use_tempaddr = 0
|
||||
net.ipv6.conf.all.use_tempaddr = 0
|
||||
|
||||
net.ipv6.conf.all.accept_ra = 1
|
||||
EOF
|
||||
|
||||
cat > "$rootfs_tmpdir/etc/network/interfaces" <<EOF
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet6 manual
|
||||
pre-up modprobe ipv6 && sysctl -w net.ipv6.conf.eth0.accept_ra=1
|
||||
pre-up ip link set eth0 up
|
||||
post-up ip addr show dev eth0 | grep inet6 >> /etc/issue
|
||||
post-up echo post post up >> /etc/issue
|
||||
EOF
|
||||
|
||||
cat > "$rootfs_tmpdir/etc/hostname" <<EOF
|
||||
alpine-unconfigured
|
||||
EOF
|
||||
|
||||
echo ipv6 >> "$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"!
|
||||
|
|
Loading…
Reference in a new issue