6 lines
425 B
Bash
Executable File
6 lines
425 B
Bash
Executable File
#!/bin/sh
|
|
# Create dummy interfaces based on ifcfg files
|
|
# Useful to test nftables after copying a production VM with many interfaces to a testing VM with only one
|
|
# Georg Pfuetzenreuter <mail+opensuse@georg-pfuetzenreuter.net>
|
|
for interface in $(find /etc/sysconfig/network/prod -type f -name 'ifcfg-*' -printf '%f '); do interface=$(echo $interface|sed s/ifcfg-//); ip l a $interface type dummy; ip l s up $interface; done
|