INNER CODE UNIT · Shell

bastille_epair_num

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

                        bastille_epair_num=$((bastille_epair_num + 1))
                    done
                    local new_host_epair="e${epair_num}a_bastille${bastille_epair_num}"
                    local new_jail_epair="e${epair_num}b_bastille${bastille_epair_num}"
                    local reuse_new_suffix="bastille${bastille_epair_num}"
                else
                    local new_host_epair="e${epair_num}a_${reuse_new_suffix}"
                    local new_jail_epair="e${epair_num}b_${reuse_new_suffix}"
                fi
            fi

            local new_if_prefix="$(echo ${new_host_epair} | awk -F'_' '{print $1}')"
            local new_if_suffix="$(echo ${new_host_epair} | awk -F'_' '{print $2}')"

            if grep "${old_if_suffix}" "${jail_config}" | grep -oq "jib addm"; then
                # For -V jails
                # Replace host epair name in jail.conf
                sed -i '' "s|jib addm ${old_if_suffix}\>|jib addm ${new_if_suffix}|g" "${jail_config}"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…