generated from oci/template
20 lines
497 B
Bash
20 lines
497 B
Bash
#!/bin/bash
|
|
|
|
# Bring up all interfaces and request DHCP, except loopback
|
|
if [ -d /gns3 ]; then
|
|
echo "Running in GNS3 environment, setting up interfaces for DHCP..."
|
|
for iface in $(ip -o link show | awk -F': ' '{print $2}' | grep -v '^lo$'); do
|
|
echo "Bringing up interface: $iface"
|
|
ip link set "$iface" up
|
|
udhcpc -i "$iface" &
|
|
done
|
|
fi
|
|
|
|
# Wait a moment for DHCP leases
|
|
sleep 2
|
|
|
|
# Launch i3 window manager
|
|
/usr/bin/i3
|
|
|
|
echo "i3 exited unexpectedly"
|
|
sleep infinity
|