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

View File

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