anaconda/anaconda-40.22.3.13/dracut/anaconda-copy-prefixdevname.sh

9 lines
304 B
Bash
Raw Normal View History

2024-11-14 21:39:56 -08:00
#!/bin/sh
# Copy over persistent network device names to anaconda environment
CMDLINE=$(cat /proc/cmdline)
if [ -z "${CMDLINE##*net.ifnames.prefix=*}" ]; then
mkdir -p /run/initramfs/state/etc/systemd/network
cp /etc/systemd/network/*-net-ifnames-prefix* /run/initramfs/state/etc/systemd/network
fi