mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
Allow host-list in /etc/shorewall/hosts again
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@164 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
10b5589304
commit
63bc520aa9
@ -536,19 +536,21 @@ validate_hosts_file() {
|
|||||||
r="$z $hosts $options"
|
r="$z $hosts $options"
|
||||||
validate_zone $z || startup_error "Invalid zone ($z) in record \"$r\""
|
validate_zone $z || startup_error "Invalid zone ($z) in record \"$r\""
|
||||||
|
|
||||||
interface=${hosts%:*}
|
for host in `separate_list $hosts`; do
|
||||||
|
interface=${host%:*}
|
||||||
|
|
||||||
list_search $interface $all_interfaces || \
|
list_search $interface $all_interfaces || \
|
||||||
startup_error "Unknown interface ($interface) in record \"$r\""
|
startup_error "Unknown interface ($interface) in record \"$r\""
|
||||||
|
|
||||||
for option in `separate_list $options`; do
|
for option in `separate_list $options`; do
|
||||||
case $option in
|
case $option in
|
||||||
routestopped|-)
|
routestopped|-)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
error_message "Warning: Invalid option ($option) in record \"$r\""
|
error_message "Warning: Invalid option ($option) in record \"$r\""
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done < $TMP_DIR/hosts
|
done < $TMP_DIR/hosts
|
||||||
}
|
}
|
||||||
@ -2588,7 +2590,7 @@ verify_os_version() {
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Add IP Aliases #
|
# Add IP Aliases #
|
||||||
################################################################################
|
################################################################################
|
||||||
add_ip_aliases() # $* = addresses and devices
|
add_ip_aliases()
|
||||||
{
|
{
|
||||||
do_one()
|
do_one()
|
||||||
{
|
{
|
||||||
@ -2620,6 +2622,8 @@ add_ip_aliases() # $* = addresses and devices
|
|||||||
echo " IP Address $external added to interface $interface"
|
echo " IP Address $external added to interface $interface"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set -- $aliases_to_add
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
external=$1
|
external=$1
|
||||||
interface=$2
|
interface=$2
|
||||||
@ -3199,7 +3203,7 @@ define_firewall() # $1 = Command (Start or Restart)
|
|||||||
|
|
||||||
[ -n "$aliases_to_add" ] && \
|
[ -n "$aliases_to_add" ] && \
|
||||||
echo "Adding IP Addresses..." && \
|
echo "Adding IP Addresses..." && \
|
||||||
add_ip_aliases $aliases_to_add
|
add_ip_aliases
|
||||||
|
|
||||||
run_user_exit start
|
run_user_exit start
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user