INNER CODE UNIT · Shell

CLONE_INTERFACE_COUNT

BastilleBSD/bastille · usr/local/share/bastille/clone.sh:215

        CLONE_INTERFACE_COUNT=$((CLONE_INTERFACE_COUNT + 1))
        local old_if_prefix="$(echo ${if} | awk -F'_' '{print $1}')"
        local old_if_suffix="$(echo ${if} | awk -F'_' '{print $2}')"

        # For if_bridge network type
        if [ "${bastille_network_vnet_type}" = "if_bridge" ]; then

            local epair_num="$(echo "${old_if_prefix}" | grep -Eo "[0-9]+")"
            local old_host_epair="${if}"
            local old_jail_epair="${old_if_prefix%a}b_${old_if_suffix}"

            if [ "$(echo -n "e${epair_num}a_${NEWNAME}" | awk '{print length}')" -lt 16 ]; then
                # Generate new epair name
                local new_host_epair="e${epair_num}a_${NEWNAME}"
                local new_jail_epair="e${epair_num}b_${NEWNAME}"
            else
                if [ -z "${reuse_new_suffix}" ]; then
                    get_bastille_epair_count

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…