From 6ab425e7d378a9ef980fffe4d8d3567859de74ca Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 10 May 2025 21:55:28 -0600 Subject: [PATCH] clone: Fix replacing IF with subnet (/) --- usr/local/share/bastille/clone.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/local/share/bastille/clone.sh b/usr/local/share/bastille/clone.sh index 39b52733..4d2b438a 100644 --- a/usr/local/share/bastille/clone.sh +++ b/usr/local/share/bastille/clone.sh @@ -181,9 +181,9 @@ update_jailconf() { _ip="$(echo ${_ip} | awk -F"|" '{print $2}')" fi if [ "${_interface}" != "not set" ]; then - sed -i '' "s/.*ip4.addr = .*/ ip4.addr = ${_interface}|${IP};/" "${JAIL_CONFIG}" + sed -i '' "s#.*ip4.addr = .*# ip4.addr = ${_interface}|${IP};#" "${JAIL_CONFIG}" else - sed -i '' "/ip4.addr = .*/ s/${_ip}/${IP}/" "${JAIL_CONFIG}" + sed -i '' "/ip4.addr = .*/ s#${_ip}#${IP}#" "${JAIL_CONFIG}" fi sed -i '' "/ip4.addr += .*/ s/${_ip}/127.0.0.1/" "${JAIL_CONFIG}" done @@ -487,4 +487,4 @@ info "\nAttempting to clone '${TARGET}' to '${NEWNAME}'..." clone_jail -echo \ No newline at end of file +echo