mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-11 16:18:13 +01:00
Make /sbin/shorewall issue a warning whenever startup is disabled
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2348 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
57b23fc2ba
commit
1b5ac5c7d3
@ -2384,8 +2384,9 @@ setup_mac_lists() {
|
|||||||
fatal_error "Interface $interface must be up before Shorewall can start"
|
fatal_error "Interface $interface must be up before Shorewall can start"
|
||||||
|
|
||||||
ip -f inet addr show $interface 2> /dev/null | grep 'inet.*brd' | sed 's/inet //; s/brd //; s/scope.*//;' | while read address broadcast; do
|
ip -f inet addr show $interface 2> /dev/null | grep 'inet.*brd' | sed 's/inet //; s/brd //; s/scope.*//;' | while read address broadcast; do
|
||||||
|
address=${address%/*}
|
||||||
if [ -n "$broadcast" ]; then
|
if [ -n "$broadcast" ]; then
|
||||||
run_iptables -A $chain -s ${address%/*} -d $broadcast -j $chain1
|
run_iptables -A $chain -s $address -d $broadcast -j $chain1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run_iptables -A $chain -s $address -d 255.255.255.255 -j $chain1
|
run_iptables -A $chain -s $address -d 255.255.255.255 -j $chain1
|
||||||
|
@ -228,6 +228,11 @@ get_config() {
|
|||||||
|
|
||||||
export RESTOREFILE
|
export RESTOREFILE
|
||||||
|
|
||||||
|
case $STARTUP_ENABLED in
|
||||||
|
[Nn][Oo])
|
||||||
|
echo " WARNING: Shorewall startup is disabled. To enable startup, set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf" >&2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user