forked from extern/shorewall_code
Recode fix for find_first_interface_address()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
c9b46d5688
commit
94fb15bec3
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user