mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-21 09:41:47 +01:00
config: Allow setting ip[4|6].addr with out IF
This commit is contained in:
@@ -118,6 +118,17 @@ for _jail in ${JAILS}; do
|
|||||||
|
|
||||||
(
|
(
|
||||||
|
|
||||||
|
# Backwards compatibility for specifying only an IP with ip[4|6].addr
|
||||||
|
if [ "${ACTION}" = "set" ] && [ "${PROPERTY}" = "ip4.addr" ]; then
|
||||||
|
if ! echo "${VALUE}" | grep -q "|"; then
|
||||||
|
VALUE="$(bastille config ${_jail} get ip4.addr | awk -F"|" '{print $1}')|${VALUE}"
|
||||||
|
fi
|
||||||
|
elif [ "${ACTION}" = "set" ] && [ "${PROPERTY}" = "ip6.addr" ]; then
|
||||||
|
if ! echo "${VALUE}" | grep -q "|"; then
|
||||||
|
VALUE="$(bastille config ${_jail} get ip6.addr | awk -F"|" '{print $1}')|${VALUE}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Handle Bastille specific properties
|
# Handle Bastille specific properties
|
||||||
# Currently only 'depend' 'priority' and 'boot'
|
# Currently only 'depend' 'priority' and 'boot'
|
||||||
if [ "${PROPERTY}" = "priority" ] || [ "${PROPERTY}" = "prio" ]; then
|
if [ "${PROPERTY}" = "priority" ] || [ "${PROPERTY}" = "prio" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user