forked from extern/shorewall_code
Touch up wait4ifup
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5215 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
5460c0871a
commit
7094c04dfd
@ -628,9 +628,13 @@ New Features in Shorewall 3.4:
|
||||
/usr/share/shorewall/wait4ifup <interface> [ <seconds> ]
|
||||
|
||||
The program will wait for up to <seconds> seconds for the
|
||||
named <interface> to reach the UP state. if <seconds> is not given,
|
||||
named <interface> to reach the UP state. If <seconds> is not given,
|
||||
60 seconds is assumed.
|
||||
|
||||
The exit status is zero if <interface> comes up within <seconds>
|
||||
seconds and non-zero otherwise.
|
||||
|
||||
|
||||
Problems Corrected in 3.4.0 Beta 1.
|
||||
|
||||
1) It is now possible to place entries in the IPSEC column of
|
||||
|
@ -10,6 +10,6 @@
|
||||
# See http://shorewall.net/PacketMarking.html for a detailed description of
|
||||
# the Netfilter/Shorewall packet marking mechanism.
|
||||
###############################################################################
|
||||
#MARK SOURCE DEST PROTO PORT(S) CLIENT USER TEST LENGTH TOS
|
||||
# PORT(S)
|
||||
#MARK SOURCE DEST PROTO DEST SOURCE USER TEST LENGTH TOS
|
||||
# PORT(S) PORT(S)
|
||||
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
|
||||
|
@ -1,8 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Shorewall interface helper utility - V3.4
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/copyleft/gpl.htm]
|
||||
#
|
||||
# (c) 2007 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# This file is installed in /usr/share/shorewall/wait4ifup
|
||||
#
|
||||
# Shorewall documentation is available at http://www.shorewall.net
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of Version 2 of the GNU General Public License
|
||||
# as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
|
||||
#
|
||||
# If an error occurs while starting or restarting the firewall, the
|
||||
# firewall is automatically stopped.
|
||||
#
|
||||
# The firewall uses configuration files in /etc/shorewall/ - skeleton
|
||||
# files is included with the firewall.
|
||||
#
|
||||
# wait4ifup <interface> [ <seconds to wait> ]
|
||||
#
|
||||
|
||||
#
|
||||
# Determine if Interface is up
|
||||
#
|
||||
interface_is_up() {
|
||||
[ -n "$(ip link ls dev $1 | grep -e '[<,]UP[,>]')" ]
|
||||
}
|
||||
@ -25,4 +54,6 @@ while [ $timeout -gt 0 ] && ! interface_is_up $1; do
|
||||
timeout=$(( $timeout - 1 ))
|
||||
done
|
||||
|
||||
interface_is_up $1
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user