From c696e4798f0eaa9d7af5297d7d5807104d2d16ae Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sun, 23 Nov 2025 00:32:25 -0500 Subject: [PATCH] rename: fix renaming epair in rc.conf --- usr/local/share/bastille/rename.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/local/share/bastille/rename.sh b/usr/local/share/bastille/rename.sh index d4321d1a..094179d9 100644 --- a/usr/local/share/bastille/rename.sh +++ b/usr/local/share/bastille/rename.sh @@ -183,7 +183,7 @@ update_jailconf_vnet() { sed -i '' "s|host interface for Bastille jail ${TARGET}\>|host interface for Bastille jail ${NEWNAME}|g" "${jail_conf}" # Replace epair name in /etc/rc.conf - sed -i '' "/ifconfig/ s|\<${old_jail_epair}\>|${new_jail_epair}|g" "${jail_rc_conf}" + sed -i '' "s|ifconfig_${old_jail_epair}_name|ifconfig_${new_jail_epair}_name|g" "${jail_rc_conf}" else # For -B jails # Replace host epair name in jail.conf @@ -202,7 +202,7 @@ update_jailconf_vnet() { sed -i '' "s|host interface for Bastille jail ${TARGET}\>|host interface for Bastille jail ${NEWNAME}|g" "${jail_conf}" # Replace epair name in /etc/rc.conf - sed -i '' "/ifconfig/ s|\<${old_jail_epair}\>|${new_jail_epair}|g" "${jail_rc_conf}" + sed -i '' "s|ifconfig_${old_jail_epair}_name|ifconfig_${new_jail_epair}_name|g" "${jail_rc_conf}" fi # For netgraph network type elif [ "${bastille_network_vnet_type}" = "netgraph" ]; then @@ -224,7 +224,7 @@ update_jailconf_vnet() { sed -i '' "s|= ${old_ngif};|= ${new_ngif};|g" "${jail_conf}" # Replace epair name in /etc/rc.conf - sed -i '' "/ifconfig/ s|\<${old_ngif}\>|${new_ngif}|g" "${jail_rc_conf}" + sed -i '' "s|ifconfig_${old_ngif}_name|ifconfig_${new_ngif}_name|g" "${jail_rc_conf}" fi done }