test/TEST-50-MULTINIC/client-init.sh: skip MAC marker files
[dracut.git] / test / TEST-50-MULTINIC / client-init.sh
blob51f8b6422826bbc6c7cc181a4ca561146f107e08
1 #!/bin/sh
2 exec >/dev/console 2>&1
3 set -x
4 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
5 strstr() { [ "${1#*$2*}" != "$1" ]; }
6 CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
7 export TERM=linux
8 export PS1='initramfs-test:\w\$ '
9 stty sane
10 echo "made it to the rootfs! Powering down."
11 for i in /run/initramfs/net.*.did-setup; do
12 strstr "$i" ":*:*:*:*:" && continue
13 i=${i%.did-setup}
14 IFACES+="${i##*/net.} "
15 done
17 echo "OK"
18 echo "$IFACES"
19 } > /dev/sda
21 strstr "$CMDLINE" "rd.shell" && sh -i
22 poweroff -f