From 3f665e4738d48735ba52f63fe247d277828d82fe Mon Sep 17 00:00:00 2001 From: Roman Marchenko Date: Wed, 15 Feb 2023 13:36:26 +0100 Subject: [PATCH] Rename command now affects name of created vnet interfaces --- usr/local/share/bastille/rename.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr/local/share/bastille/rename.sh b/usr/local/share/bastille/rename.sh index 5fd645c1..6b9ad75e 100644 --- a/usr/local/share/bastille/rename.sh +++ b/usr/local/share/bastille/rename.sh @@ -68,6 +68,10 @@ update_jailconf() { sed -i '' "s|path.*=.*;|path = ${bastille_jailsdir}/${NEWNAME}/root;|" "${JAIL_CONFIG}" sed -i '' "s|mount.fstab.*=.*;|mount.fstab = ${bastille_jailsdir}/${NEWNAME}/fstab;|" "${JAIL_CONFIG}" sed -i '' "s|${TARGET}.*{|${NEWNAME} {|" "${JAIL_CONFIG}" + # Rename vnet interface + sed -i '' "/vnet.interface/s|_${TARGET}\";|_${NEWNAME}\";|" "${JAIL_CONFIG}" + sed -i '' "/ifconfig/s|_${TARGET}|_${NEWNAME}|" "${JAIL_CONFIG}" + fi fi }