2018-03-10 23:40:07 +00:00
|
|
|
#!/bin/ash
|
|
|
|
|
|
|
|
# bring up the ethernet; maybe should do DHCP?
|
|
|
|
ifconfig lo 127.0.0.1
|
|
|
|
|
2018-03-14 00:55:34 +00:00
|
|
|
network_modules="e1000 e1000e igb sfc mdio mlx4_core mlx4_en"
|
|
|
|
for module in `echo $network_modules`; do
|
|
|
|
if [ -f /lib/modules/$module.ko ]; then
|
|
|
|
insmod /lib/modules/$module.ko
|
|
|
|
fi
|
|
|
|
done
|
2018-03-10 23:40:07 +00:00
|
|
|
|
|
|
|
if [ -e /sys/class/net/eth0 ]; then
|
2018-03-14 00:55:34 +00:00
|
|
|
# Set up static IP
|
2018-03-10 23:40:07 +00:00
|
|
|
if [ ! -z "$CONFIG_BOOT_STATIC_IP" ]; then
|
|
|
|
ifconfig eth0 $CONFIG_BOOT_STATIC_IP
|
|
|
|
fi
|
2018-03-14 00:55:34 +00:00
|
|
|
# TODO: Set up DHCP if available
|
2018-03-10 23:40:07 +00:00
|
|
|
ifconfig eth0 > /dev/ttyprintk
|
|
|
|
|
2018-03-14 00:55:34 +00:00
|
|
|
# Set up the ssh server, allow root logins and log to stderr
|
2018-03-10 23:40:07 +00:00
|
|
|
if [ ! -d /etc/dropbear ]; then
|
|
|
|
mkdir /etc/dropbear
|
|
|
|
fi
|
|
|
|
dropbear -B -R 2>/dev/ttyprintk
|
|
|
|
|
|
|
|
ifconfig eth0 | head -1 > /dev/tty0
|
|
|
|
fi
|