TEST-30-ISCSI/test.sh: factor out client runs
[platform/upstream/dracut.git] / test / TEST-30-ISCSI / server-init.sh
1 #!/bin/sh
2 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
3 export TERM=linux
4 export PS1='nfstest-server:\w\$ '
5 stty sane
6 echo "made it to the rootfs!"
7 echo server > /proc/sys/kernel/hostname
8 ip addr add 127.0.0.1/8 dev lo
9 ip link set lo up
10 ip addr add 192.168.50.1/24 dev eth0
11 ip link set eth0 up
12 >/var/lib/dhcpd/dhcpd.leases
13 chmod 777 /var/lib/dhcpd/dhcpd.leases
14 dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
15 # Wait forever for the VM to die
16 /usr/sbin/iscsi-target -D -t iqn.2009-06.dracut
17 mount -n -o remount,ro /
18 poweroff -f