]> git.ipfire.org Git - thirdparty/dracut.git/blob - test/TEST-60-IFCFG/client-init.sh
test: copy BONDBRIDGETEAMVLAN to IFCFG
[thirdparty/dracut.git] / test / TEST-60-IFCFG / client-init.sh
1 #!/bin/sh
2 exec >/dev/console 2>&1
3 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
4 strstr() { [ "${1#*$2*}" != "$1" ]; }
5 CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
6 export TERM=linux
7 export PS1='initramfs-test:\w\$ '
8 stty sane
9 echo "made it to the rootfs! Powering down."
10
11 (
12 echo OK
13 ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort
14 for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do
15 echo $i
16 grep -v 'UUID=' $i
17 done
18 echo EOF
19 ) > /dev/sda
20
21 strstr "$CMDLINE" "rd.shell" && sh -i
22 poweroff -f