Bug was in my original Makefile so not your fault :-)
Patch fixes the issue - when there is config problem make returned exit
status 0 so error wasn't seen properly as failure.
We found this because our software checks for errors and didn't catch
obvious configuration issue...
--
Tuomo Soini <[email protected]>
Foobar Linux services
+358 40 5240030
Foobar Oy <http://foobar.fi/>
commit bf76a4d14bb50dc331afc8ba08f73014c4bc7960
Author: Tuomo Soini <[email protected]>
Date: Wed Mar 14 18:57:06 2012 +0200
Shorewall*/Makefile: fix make to return error in case of failure
diff --git a/Shorewall-lite/Makefile b/Shorewall-lite/Makefile
index c30ccb8..591d5fa 100644
--- a/Shorewall-lite/Makefile
+++ b/Shorewall-lite/Makefile
@@ -12,7 +12,7 @@ $(VARDIR)/${RESTOREFILE}: $(VARDIR)/firewall
then \
/sbin/shorewall-lite -q save >/dev/null; \
else \
- /sbin/shorewall-lite -q restart 2>&1 | tail >&2; \
+ /sbin/shorewall-lite -q restart 2>&1 | tail >&2; exit 1; \
fi
# EOF
diff --git a/Shorewall/Makefile b/Shorewall/Makefile
index 0858a16..80f511d 100644
--- a/Shorewall/Makefile
+++ b/Shorewall/Makefile
@@ -2,6 +2,7 @@
VARDIR=$(shell /sbin/shorewall show vardir)
CONFDIR=/etc/shorewall
RESTOREFILE?=firewall
+
all: $(VARDIR)/${RESTOREFILE}
$(VARDIR)/${RESTOREFILE}: $(CONFDIR)/*
@@ -11,11 +12,12 @@ $(VARDIR)/${RESTOREFILE}: $(CONFDIR)/*
then \
/sbin/shorewall -q save >/dev/null; \
else \
- /sbin/shorewall -q restart 2>&1 | tail >&2; \
+ /sbin/shorewall -q restart 2>&1 | tail >&2; exit 1; \
fi
clean:
@rm -f $(CONFDIR)/*~ $(CONFDIR)/.*~
+
.PHONY: clean
# EOF
diff --git a/Shorewall6-lite/Makefile b/Shorewall6-lite/Makefile
index 1c672e4..a7a8ba7 100644
--- a/Shorewall6-lite/Makefile
+++ b/Shorewall6-lite/Makefile
@@ -12,7 +12,7 @@ $(VARDIR)/${RESTOREFILE}: $(VARDIR)/firewall
then \
/sbin/shorewall6-lite -q save >/dev/null; \
else \
- /sbin/shorewall6-lite -q restart 2>&1 | tail >&2; \
+ /sbin/shorewall6-lite -q restart 2>&1 | tail >&2; exit 1; \
fi
# EOF
diff --git a/Shorewall6/Makefile b/Shorewall6/Makefile
index 61fe447..a053776 100644
--- a/Shorewall6/Makefile
+++ b/Shorewall6/Makefile
@@ -2,6 +2,7 @@
VARDIR=$(shell /sbin/shorewall6 show vardir)
CONFDIR=/etc/shorewall6
RESTOREFILE?=firewall
+
all: $(VARDIR)/${RESTOREFILE}
$(VARDIR)/${RESTOREFILE}: $(CONFDIR)/*
@@ -11,11 +12,12 @@ $(VARDIR)/${RESTOREFILE}: $(CONFDIR)/*
then \
/sbin/shorewall6 -q save >/dev/null; \
else \
- /sbin/shorewall6 -q restart 2>&1 | tail >&2; \
+ /sbin/shorewall6 -q restart 2>&1 | tail >&2; exit 1; \
fi
clean:
@rm -f $(CONFDIR)/*~ $(CONFDIR)/.*~
+
.PHONY: clean
# EOF
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel