]> git.ipfire.org Git - thirdparty/dracut.git/blob - test/TEST-40-NBD/client-init.sh
Renamed all shell scripts to *.sh
[thirdparty/dracut.git] / test / TEST-40-NBD / client-init.sh
1 #!/bin/sh
2 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
3 exec >/dev/console 2>&1
4 while read dev fs fstype opts rest; do
5 [ "$dev" = "rootfs" ] && continue
6 [ "$fs" != "/" ] && continue
7 echo "nbd-OK $fstype $opts" >/dev/sda
8 echo "nbd-OK $fstype $opts"
9 break
10 done < /proc/mounts
11 export TERM=linux
12 export PS1='nbdclient-test:\w\$ '
13 stty sane
14 echo "made it to the rootfs! Powering down."
15 #sh -i
16 mount -n -o remount,ro / &> /dev/null
17 poweroff -f