Skip to content

Commit

Permalink
Merge pull request #572 from UrsusDominatus/rename_command_vnet_inter…
Browse files Browse the repository at this point in the history
…faces

Rename command now affects name of created vnet interfaces
  • Loading branch information
cedwards committed Feb 15, 2023
2 parents 9588d52 + c016bc0 commit 5c84731
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions usr/local/share/bastille/rename.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ 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
}
Expand Down

0 comments on commit 5c84731

Please sign in to comment.