mirror of
https://gitlab.com/shorewall/code.git
synced 2025-05-31 06:55:42 +02:00
Recode fix for find_first_interface_address()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
eb47b9b54f
commit
c49e3076ec
@ -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
|
||||||
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user