Recode fix for find_first_interface_address()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-04-07 13:28:07 -07:00
parent c9b46d5688
commit 94fb15bec3
2 changed files with 11 additions and 10 deletions

View File

@ -435,11 +435,7 @@ find_first_interface_address() # $1 = interface
#
# If there wasn't one, bail out now
#
if [ -z "$addr" ]; then
echo " ERROR: Can't determine the IP address of $1" >&2
kill $$
exit 1
fi
[ -n "$addr" ] || startup_error "Can't determine the IP address of $1"
#
# Strip off the trailing VLSM mask (or the peer IP in case of a P-t-P link)
# along with everything else on the line

View File

@ -300,15 +300,20 @@ get_config() {
esac
}
#
# Fatal error
#
startup_error() {
echo " ERROR: $@" >&2
kill $$
exit 1
}
#
# Run the compiler
#
compiler() {
startup_error() {
echo " ERROR: $@" >&2
exit 1
}
if [ $(id -u) -ne 0 ]; then
if [ -z "$SHOREWALL_DIR" -o "$SHOREWALL_DIR" = /etc/shorewall ]; then
startup_error "Ordinary users may not compile the /etc/shorewall configuration"