On 06/25/2012 05:58 AM, Jan van der Vyver wrote:
Hope This helps to explain.
It doesn't :-(
The dash shell included in the latest versions of Ubuntu is not backward
compatible with earlier versions. The recent Shorewall 4.5 releases work
around this incompatibility -- 4.4.26 does not.
The attached patch should work around the problem so that a useful dump
can be obtained.
patch /usr/share/shorewall/lib.cli < DASH.patch
Better yet would be to upgrade your Shorewall installation.
-Tom
--
Tom Eastep \ When I die, I want to go like my Grandfather who
Shoreline, \ died peacefully in his sleep. Not screaming like
Washington, USA \ all of the passengers in his car
http://shorewall.net \________________________________________________
diff --git a/lib.cli.orig b/lib.cli
index 230da38..916b54f 100644
--- a/lib.cli.orig
+++ b/lib.cli
@@ -386,15 +386,24 @@ save_config() {
}
#
+# Isolate the table in the routing rules being read from stdin.
+# Piping through sed to remove trailing whitespace works around
+# recent 'features' in dash and ip.
+#
+find_tables() {
+ sed -r 's/[[:space:]]+$//' | while read rule; do
+ echo ${rule##* }
+ done
+}
+
+#
# Show routing configuration
#
show_routing() {
if [ -n "$(ip rule list)" ]; then
heading "Routing Rules"
ip rule list
- ip rule list | while read rule; do
- echo ${rule##* }
- done | sort -u | while read table; do
+ ip rule list | find_tables | sort -u | while read table; do
heading "Table $table:"
ip route list table $table
done
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users