Hack to get BitFolk's static IP setup on a Debian Live image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur a/usr/lib/live/boot/9990-networking.sh b/usr/lib/live/boot/9990-networking.sh | |
--- a/usr/lib/live/boot/9990-networking.sh 2022-01-28 21:16:07.880622551 +0000 | |
+++ b/usr/lib/live/boot/9990-networking.sh 2022-01-28 21:15:40.504719118 +0000 | |
@@ -104,16 +104,25 @@ | |
fi | |
done | |
else | |
- for interface in ${DEVICE}; do | |
- ipconfig -t "$ETHDEV_TIMEOUT" "${interface}" | tee "/netboot-${interface}.config" | |
- | |
- [ -e "/run/net-${interface}.conf" ] && . "/run/net-${interface}.conf" | |
- | |
- if [ "$IPV4ADDR" != "0.0.0.0" ] | |
- then | |
- break | |
- fi | |
- done | |
+ echo "STATICIP: $STATICIP" | |
+ bfip=$(echo ${STATICIP} | cut -d: -f 1) | |
+ bfgw=$(echo ${STATICIP} | cut -d: -f 3) | |
+ bfnet=$(echo ${STATICIP} | cut -d: -f 4) | |
+ ip address add ${bfip}/${bfnet} dev ${DEVICE} | |
+ ip link set up dev ${DEVICE} | |
+ ip link show dev ${DEVICE} | |
+ ip route add default via ${bfgw} | |
+ sleep 2 | |
+# for interface in ${DEVICE}; do | |
+# ipconfig -t "$ETHDEV_TIMEOUT" "${interface}" | tee "/netboot-${interface}.config" | |
+# | |
+# [ -e "/run/net-${interface}.conf" ] && . "/run/net-${interface}.conf" | |
+# | |
+# if [ "$IPV4ADDR" != "0.0.0.0" ] | |
+# then | |
+# break | |
+# fi | |
+# done | |
fi | |
for interface in ${DEVICE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment