mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 09:16:21 +00:00
Make eth0 init condition on module, remove early bin/ash
To avoid unnecessary errors, only load the eth0 network if the e1000 module exists. Also remove /bin/ash so CONFIG_BOOTSCRIPT works.
This commit is contained in:
parent
1459e701e3
commit
c35f385cf7
20
initrd/init
20
initrd/init
@ -29,15 +29,18 @@ fi
|
||||
# bring up the ethernet; maybe should do DHCP?
|
||||
ifconfig lo 127.0.0.1
|
||||
|
||||
insmod /lib/modules/e1000.ko
|
||||
ifconfig eth0 10.0.2.15 # qemu
|
||||
ifconfig eth0 > /dev/ttyprintk
|
||||
if [ -f /lib/modules/e1000.ko ];
|
||||
insmod /lib/modules/e1000.ko
|
||||
ifconfig eth0 10.0.2.15 # qemu
|
||||
ifconfig eth0 > /dev/ttyprintk
|
||||
|
||||
# Setup the ssh server, allow root logins and log to stderr
|
||||
if [ ! -d /etc/dropbear ]; then
|
||||
mkdir /etc/dropbear
|
||||
if [ ! -d /etc/dropbear ]; then
|
||||
mkdir /etc/dropbear
|
||||
fi
|
||||
dropbear -B -R 2>/dev/ttyprintk
|
||||
ifconfig eth0 | head -1 > /dev/tty0
|
||||
fi
|
||||
dropbear -B -R 2>/dev/ttyprintk
|
||||
|
||||
# Recovery shells will erase anything from here
|
||||
mkdir -p /tmp/secret
|
||||
@ -48,11 +51,6 @@ if [ -r /etc/motd ]; then
|
||||
cat /etc/motd > /dev/tty0
|
||||
fi
|
||||
|
||||
ifconfig eth0 | head -1 > /dev/tty0
|
||||
|
||||
# For now we just start a shell
|
||||
exec /bin/ash
|
||||
|
||||
# Load the date from the hardware clock, setting it in local time
|
||||
hwclock -l -s
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user