mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-21 13:57:52 +00:00
d0294b1142
also fix verbiage in comments
29 lines
675 B
Bash
Executable File
29 lines
675 B
Bash
Executable File
#!/bin/ash
|
|
|
|
# bring up the ethernet; maybe should do DHCP?
|
|
ifconfig lo 127.0.0.1
|
|
|
|
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
|
|
|
|
if [ -e /sys/class/net/eth0 ]; then
|
|
# Set up static IP
|
|
if [ ! -z "$CONFIG_BOOT_STATIC_IP" ]; then
|
|
ifconfig eth0 $CONFIG_BOOT_STATIC_IP
|
|
fi
|
|
# TODO: Set up DHCP if available
|
|
ifconfig eth0 > /dev/ttyprintk
|
|
|
|
# Set up the ssh server, allow root logins and log to stderr
|
|
if [ ! -d /etc/dropbear ]; then
|
|
mkdir /etc/dropbear
|
|
fi
|
|
dropbear -B -R 2>/dev/ttyprintk
|
|
|
|
ifconfig eth0 | head -1 > /dev/tty0
|
|
fi
|