From 87cdd8fa505f9fc78d2303568692f328a876ef4e Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Fri, 23 Aug 2024 15:08:07 +0200 Subject: [PATCH] Add mkdummies script Signed-off-by: Georg Pfuetzenreuter --- linux/mkdummies.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 linux/mkdummies.sh diff --git a/linux/mkdummies.sh b/linux/mkdummies.sh new file mode 100755 index 0000000..137b578 --- /dev/null +++ b/linux/mkdummies.sh @@ -0,0 +1,5 @@ +#!/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 +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