summaryrefslogtreecommitdiffstats
path: root/make-initramfs.sh.in
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-03 11:27:52 +0100
committerRichard Jones <rjones@redhat.com>2009-04-03 11:27:52 +0100
commita8b84fe17f5df830d3498ecf885e52f0914182dd (patch)
treebd68e072de5074cd1ebdb994e42dabd37edcda4e /make-initramfs.sh.in
parent8d0068a752ee8e6bc223de5cb7cac5d190a8855e (diff)
downloadlibguestfs-a8b84fe17f5df830d3498ecf885e52f0914182dd.tar.gz
libguestfs-a8b84fe17f5df830d3498ecf885e52f0914182dd.tar.xz
libguestfs-a8b84fe17f5df830d3498ecf885e52f0914182dd.zip
Set up ethernet interface.
Diffstat (limited to 'make-initramfs.sh.in')
-rwxr-xr-xmake-initramfs.sh.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/make-initramfs.sh.in b/make-initramfs.sh.in
index aaaa92ef..ccbb86a4 100755
--- a/make-initramfs.sh.in
+++ b/make-initramfs.sh.in
@@ -74,6 +74,11 @@ if [ ! -f initramfs/etc/fstab ]; then
@FEBOOTSTRAP_RUN@ initramfs -- touch /etc/fstab
fi
+echo nameserver 10.0.2.3 > initramfs/etc/resolv.conf.new
+@FEBOOTSTRAP_RUN@ initramfs -- \
+ install -m 0644 -o root -g root /etc/resolv.conf.new /etc/resolv.conf
+rm initramfs/etc/resolv.conf.new
+
# Create the init script.
cat > initramfs/init.new <<'__EOF__'
#!/bin/sh
@@ -83,8 +88,10 @@ MAKEDEV mem null port zero core full ram tty console fd \
mount -t proc /proc /proc
mount -t sysfs /sys /sys
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
-modprobe nfsd
+modprobe nfsd 8139cp
/sbin/ifconfig lo 127.0.0.1
+/sbin/ifconfig eth0 10.0.2.10
+/sbin/route add default gw 10.0.2.2
lvm vgscan --ignorelockingfailure
lvm vgchange -ay --ignorelockingfailure
rpcbind