anaconda/anaconda-40.22.3.13/dracut/anaconda-copy-prefixdevname.sh
2024-11-14 21:39:56 -08:00

8 lines
304 B
Bash
Executable file

#!/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