init tuto2: allow user to alter the boot sequence (eg. to perform a custom modprobe)

This commit is contained in:
nemunaire 2019-03-15 18:28:38 +01:00
parent 58b939a61b
commit 84f23281fd

View File

@ -107,6 +107,8 @@ files:
mount --move . / mount --move . /
/bin/umount -n /overlay /bin/umount -n /overlay
[ -f "etc/adlin.init"] && source etc/adlin.init
# Setting up wireguard tunnel # Setting up wireguard tunnel
[ -z "${WGTOKEN}" ] && [ -f "etc/adlin.token" ] && WGTOKEN=$(cat etc/adlin.token) [ -z "${WGTOKEN}" ] && [ -f "etc/adlin.token" ] && WGTOKEN=$(cat etc/adlin.token)
[ -z "${WGTOKEN}" ] && { [ -z "${WGTOKEN}" ] && {
@ -114,7 +116,7 @@ files:
read WGTOKEN read WGTOKEN
} }
/sbin/sysctl -w net.ipv6.conf.eth0.autoconf=0 /sbin/sysctl -w net.ipv6.conf.eth0.autoconf=0
/bin/ip link set up dev eth0 /bin/ip link set up dev eth0 || { /sbin/modprobe e1000; /bin/ip link set up dev eth0 }
/bin/busybox udhcpc -n -q /bin/busybox udhcpc -n -q
[ -f "etc/wireguard/adlin.conf" ] && WGPRVKEY=$(sed 's/^.*PrivateKey *= *//p;d' etc/wireguard/adlin.conf) [ -f "etc/wireguard/adlin.conf" ] && WGPRVKEY=$(sed 's/^.*PrivateKey *= *//p;d' etc/wireguard/adlin.conf)
[ -z "${WGPRVKEY}" ] && WGPRVKEY=$(/usr/bin/wg genkey) [ -z "${WGPRVKEY}" ] && WGPRVKEY=$(/usr/bin/wg genkey)