mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-03 19:23:42 +01:00
create: Static MAC optional
This commit is contained in:
@@ -41,12 +41,13 @@ usage() {
|
|||||||
cat << EOF
|
cat << EOF
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
-E | --empty -- Creates an empty container, intended for custom jail builds (thin/thick/linux or unsupported).
|
-M | --static-mac -- Generate a static MAC address for jail (VNET only).
|
||||||
-L | --linux -- This option is intended for testing with Linux jails, this is considered experimental.
|
-E | --empty -- Creates an empty container, intended for custom jail builds (thin/thick/linux or unsupported).
|
||||||
-T | --thick -- Creates a thick container, they consume more space as they are self contained and independent.
|
-L | --linux -- This option is intended for testing with Linux jails, this is considered experimental.
|
||||||
-V | --vnet -- Enables VNET, VNET containers are attached to a virtual bridge interface for connectivity.
|
-T | --thick -- Creates a thick container, they consume more space as they are self contained and independent.
|
||||||
-C | --clone -- Creates a clone container, they are duplicates of the base release, consume low space and preserves changing data.
|
-V | --vnet -- Enables VNET, VNET containers are attached to a virtual bridge interface for connectivity.
|
||||||
-B | --bridge -- Enables VNET, VNET containers are attached to a specified, already existing external bridge.
|
-C | --clone -- Creates a clone container, they are duplicates of the base release, consume low space and preserves changing data.
|
||||||
|
-B | --bridge -- Enables VNET, VNET containers are attached to a specified, already existing external bridge.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
@@ -229,7 +230,7 @@ generate_vnet_jail_conf() {
|
|||||||
else
|
else
|
||||||
devfs_ruleset_value=13
|
devfs_ruleset_value=13
|
||||||
fi
|
fi
|
||||||
NETBLOCK=$(generate_vnet_jail_netblock "$NAME" "${VNET_JAIL_BRIDGE}" "${bastille_jail_conf_interface}")
|
NETBLOCK=$(generate_vnet_jail_netblock "$NAME" "${VNET_JAIL_BRIDGE}" "${bastille_jail_conf_interface}" "${STATIC_MAC}")
|
||||||
cat << EOF > "${bastille_jail_conf}"
|
cat << EOF > "${bastille_jail_conf}"
|
||||||
${NAME} {
|
${NAME} {
|
||||||
enforce_statfs = 2;
|
enforce_statfs = 2;
|
||||||
@@ -630,10 +631,15 @@ THICK_JAIL=""
|
|||||||
CLONE_JAIL=""
|
CLONE_JAIL=""
|
||||||
VNET_JAIL=""
|
VNET_JAIL=""
|
||||||
LINUX_JAIL=""
|
LINUX_JAIL=""
|
||||||
|
STATIC_MAC=""
|
||||||
|
|
||||||
# Handle and parse options
|
# Handle and parse options
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
|
-M|--static-mac)
|
||||||
|
STATIC_MAC="1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-E|--empty)
|
-E|--empty)
|
||||||
EMPTY_JAIL="1"
|
EMPTY_JAIL="1"
|
||||||
shift
|
shift
|
||||||
|
|||||||
Reference in New Issue
Block a user