dracut-systemd/dracut-initqueue: only start service if really needed
[dracut.git] / test / TEST-50-MULTINIC / client-init.sh
blobe6157af2eeb1564ea67d95ffde78a035945ac635
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 strglobin() { [ -n "$1" -a -z "${1##*$2*}" ]; }
7 CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline)
8 export TERM=linux
9 export PS1='initramfs-test:\w\$ '
10 stty sane
11 echo "made it to the rootfs! Powering down."
12 for i in /run/initramfs/net.*.did-setup; do
13 [ -f "$i" ] || continue
14 strglobin "$i" ":*:*:*:*:" && continue
15 i=${i%.did-setup}
16 IFACES+="${i##*/net.} "
17 done
19 echo "OK"
20 echo "$IFACES"
21 } > /dev/sda
23 strstr "$CMDLINE" "rd.shell" && sh -i
24 poweroff -f