shorewall_code/docs
Matt Darfeuille 0925636995
(Fwd) [Shorewall-users] Shorewall-lite on OpenWRT
On 7 Jun 2016 at 8:21, Tom Eastep wrote:

> On 06/07/2016 06:40 AM, Matt Darfeuille wrote:
> > On 5 Jun 2016 at 12:53, Tom Eastep wrote:
> >
> >> On 06/05/2016 12:33 PM, Matt Darfeuille wrote:
> >>> On 5 Jun 2016 at 7:57, Tom Eastep wrote:
> >>>
> >>>> On 05/29/2016 02:00 AM, Matt Darfeuille wrote:
> >>>>
> >>>> Hi Matt,
> >>>>
> >>>>>
> >>>>> -------------- Enclosure number 1 ----------------
> >>>>> >From 6ff651108df33ab8be4562caef03a8582e9eac5e Mon Sep 17 00:00:00 2001
> >>>>> From: Matt Darfeuille <matdarf@gmail.com>
> >>>>> Date: Tue, 24 May 2016 13:10:28 +0200
> >>>>> Subject: [PATCH 1/8] Emulate 'ps -p' using grep to work on openwrt
> >>>>>
> >>>>> Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
> >>>>> ---
> >>>>>  Shorewall-core/lib.common | 2 +-
> >>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>>
> >>>>> diff --git a/Shorewall-core/lib.common b/Shorewall-core/lib.common
> >>>>> index 03ecb2a..fcb02ee 100644
> >>>>> --- a/Shorewall-core/lib.common
> >>>>> +++ b/Shorewall-core/lib.common
> >>>>> @@ -776,7 +776,7 @@ mutex_on()
> >>>>>  		error_message "WARNING: Stale lockfile ${lockf} removed"
> >>>>>  	    elif [ $lockpid -eq $$ ]; then
> >>>>>                  return 0
> >>>>> -	    elif ! qt ps p ${lockpid}; then
> >>>>> +	    elif ! qt ps | grep -v grep | grep ${lockpid}; then
> >>>>
> >>>> I don't see how this can work -- 'qt ps' will produce no output yet the
> >>>> code pipes into tandem greps.
> >>>>
> >>>> Do you really want this instead?
> >>>>
> >>>> elif ! ps | grep -v grep | qt grep ${lockpid}; then
> >>>>
> >>>
> >>> Oops sorry Tom, that's what I meant(do you want the corrected
> >>> patch?)!
> >>
> >> Yes, please.
> >>
> >
> > Tom, along with correcting this faulty commit I realize, after some
> > more testing, that I've also sent unnecessary commits.
> >
> > Should I revert these 3 commits(git revert ...):
> > Set proper permissions for the LOCKFILE on openwrt
> > 2ded346cb557212389212fd5adcd4c6800edbb62
> > Create lockfile before using openwrt's lock utility
> > 08e8796ff1abc3b24b8bbd40bf5e0a2b36464d61
> > Emulate 'ps -p' using grep to work on openwrt
> > 6ff651108df33ab8be4562caef03a8582e9eac5e
> >
> > or should I simply create new commits that will correct these faulty
> > commits?
> >
> > In other words what's the best way to correct submited commits.
> >
>
> Matt,
>
> Either way is fine.
>

Hopefully these 3 commits will do it(code-fixes.patch):

Patch 1 will correct the error you have point out!
On OpenWRT the lock utility doesn't allow to append the pid of the
currently running script to the LOCKFILE that's why I've simply
deleted that line(patch 2).
I've also reordered the permissions line to be added after the line
that will lock the file specified by the LOCKFILE variable(patch 3).

and two other patches:
While installing shorewall-init using the DESTDIR variable on debian,
'mkdir' would complain if the directory ${DESTDIR}/${etc}/default
already exist; corrected using 'mkdir -p ...'(patch 4).
The last patch will correct a typo in the blacklisting_support
article.

-Matt

-------------- Enclosure number 1 ----------------
>From 1a2ff15c8dc994030e819d2882570d188b99c501 Mon Sep 17 00:00:00 2001
From: Matt Darfeuille <matdarf@gmail.com>
Date: Wed, 8 Jun 2016 09:09:46 +0200
Subject: [PATCH 1/5] Correct pid detection mutex_on()

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-06-08 15:40:48 -07:00
..
images Update my config document 2015-07-19 13:50:26 -07:00
6to4.xml Cleanup of ORIGINAL DEST column references 2016-02-19 12:40:36 -08:00
Accounting.xml Remove cruft from the Accounting article 2016-02-16 15:44:23 -08:00
Actions.xml Inline mangle actions 2016-03-09 10:28:02 -08:00
Anatomy_ru.xml Add note about 3.2.6 and 'find_first_interface_address' 2008-07-07 20:22:09 +00:00
Anatomy.xml Update the anatomy doc for 5.0 2016-02-17 15:32:47 -08:00
Anti-Spoofing.xml Add an Anti-spoofing document 2012-07-15 11:26:16 -07:00
Audit.xml Audit: use new headers 2016-02-14 22:13:55 +02:00
blacklisting_support_ru.xml Add note about 3.2.6 and 'find_first_interface_address' 2008-07-07 20:22:09 +00:00
blacklisting_support.xml (Fwd) [Shorewall-users] Shorewall-lite on OpenWRT 2016-06-08 15:40:48 -07:00
bridge_fr.xml Move French language documents to the same directory as the English and Russian documents 2009-08-27 12:10:47 -07:00
bridge-Shorewall-perl.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
Build.xml Update the 'Build' and 'Install' files for 5.0 2015-11-08 13:33:25 -08:00
CompiledPrograms.xml Updates for routestopped -> stoppedrules 2015-10-05 07:51:43 -07:00
configuration_file_basics.xml Document ?WARNING and ?INFO 2016-04-18 14:47:08 -07:00
ConnectionRate.xml Correct policy file column heading names 2016-02-19 11:04:20 -08:00
dhcp.xml Update dhcp article 2016-04-13 17:36:56 -07:00
Docker.xml Save/restore docker0 rules when it isn't defined to Shorewall 2016-02-27 14:09:29 -08:00
Documentation_Index.xml Fix link 2016-04-30 08:37:20 -07:00
Dynamic.xml Clarify dynamic sub-zones 2016-05-18 08:20:23 -07:00
ECN.xml Add an ECN action to shorewall-mangle(8) 2016-02-26 09:33:16 -08:00
Events.xml Correct typos in the Events article 2016-04-25 09:00:45 -07:00
fallback.xml Shorewall 4.4.19 Changes 2011-04-03 09:56:30 -07:00
FAQ_fr.xml Move French language documents to the same directory as the English and Russian documents 2009-08-27 12:10:47 -07:00
FAQ.xml Add FAQ 1105 (Wifidog) 2016-03-05 14:41:30 -08:00
FoolsFirewall.xml Mention 'weak host model' in the Fool's firewall article 2010-11-27 11:14:51 -08:00
FTP.xml Cleanup of ORIGINAL DEST column references 2016-02-19 12:40:36 -08:00
GenericTunnels.xml Fix tunnels file column headings 2016-02-19 09:03:09 -08:00
GettingStarted.xml Clarify the Universal configuration 2015-06-19 10:00:05 -07:00
GnuCopyright.xml Web site updates for 4.2.0 2008-10-05 21:45:05 +00:00
Helpers.xml Update Helpers doc for 5.0 2016-02-17 16:32:29 -08:00
html.css renamed to a simpler "docs" 2006-02-23 01:22:17 +00:00
Install_fr.xml Move French language documents to the same directory as the English and Russian documents 2009-08-27 12:10:47 -07:00
Install.xml Update the 'Build' and 'Install' files for 5.0 2015-11-08 13:33:25 -08:00
Internals.xml Don't unconditionally detect helpers when LOAD_HELPERS_ONLY=Yes 2012-09-22 09:27:13 -07:00
Introduction.xml Correct policy file column heading names 2016-02-19 11:04:20 -08:00
IPIP.xml Fix tunnels file column headings 2016-02-19 09:03:09 -08:00
IPP2P.xml Documentation updates on top of those by Tuomo Soini 2016-02-16 14:14:40 -08:00
IPSEC-2.6.xml Remove 'LAST LINE' anachronisms 2016-02-19 12:04:32 -08:00
IPSEC.xml Eradicate usage of an interface name in the SOURCE column of the masq file 2014-06-02 07:35:02 -07:00
ipsets.xml Update ipset doc for 5.0 2016-02-18 09:10:41 -08:00
IPv6Support.xml Update IPv6 Article 2016-04-04 12:55:37 -07:00
ISO-3661.xml ISO-3661: update rules header to new format 2016-02-15 09:27:42 +02:00
kernel.xml Make Kernel Config article unmaintained 2011-06-04 06:31:25 -07:00
KVM.xml Fix typos 2014-06-13 07:25:54 -04:00
Laptop.xml Update the laptop article for 5.0 2016-02-18 09:38:50 -08:00
LennyToSqueeze.xml Correct ipset allowed characters 2011-04-11 10:02:18 -07:00
LXC.xml LXC: update header 2016-02-15 13:55:52 +02:00
MAC_Validation.xml Update MAC doc for 5.0 2016-02-18 09:46:35 -08:00
Macros.xml Cleanup of ORIGINAL DEST column references 2016-02-19 12:40:36 -08:00
Manpages6.xml Updates for routestopped -> stoppedrules 2015-10-05 07:51:43 -07:00
Manpages.xml Updates for routestopped -> stoppedrules 2015-10-05 07:51:43 -07:00
ManualChains.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
MultiISP_ru.xml Rename route_rules to rtrules -- phase 2 2012-01-09 07:19:10 -08:00
MultiISP.xml Clarify USE_DEFAULT_RT 2016-03-04 14:26:42 -08:00
Multiple_Zones.xml Update multi-zone article for 5.0 2016-02-18 15:12:47 -08:00
MyNetwork.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
NAT.xml Correct NAT file column heading 2016-02-19 09:22:15 -08:00
NetfilterOverview.xml Update Netfilter overview with Raw and Rawpost tables 2012-06-10 15:30:39 -07:00
netmap.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
NewRelease.xml Correct a typo in NewRelease.xml 2012-07-02 11:50:38 -07:00
OPENVPN.xml Fix tunnels file column headings 2016-02-19 09:03:09 -08:00
OpenVZ.xml Update the OpenVZ article for 5.0 2016-02-18 15:50:48 -08:00
PacketHandling.xml Update URLs to tcrules 2015-10-04 08:20:33 -07:00
PacketMarking.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
ping.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
PortKnocking.xml Cleanup of ORIGINAL DEST column references 2016-02-19 12:40:36 -08:00
ports.xml Update the ports article for 5.0 2016-02-18 15:57:40 -08:00
PPTP.xml Remove support for 'norfc1918' and it's associated settings in shorewall.conf 2009-06-05 10:51:30 -07:00
ProxyARP.xml ProxyARP.xml: fix proxyndp sample column matching 2016-04-06 12:00:41 +03:00
QOSExample.xml Update QOS example for 5.0 2016-02-18 16:20:08 -08:00
quotes.xml Finish passing through all the documentation with a spell checker. 2008-08-15 05:03:24 +00:00
ReleaseModel.xml Discontinue support for 4.4. 2013-07-03 10:27:59 -07:00
samba.xml Update the Samba article for 5.0 2016-02-18 16:25:30 -08:00
Shorewall_and_Aliased_Interfaces.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
Shorewall_and_Kazaa.xml Finish passing through all the documentation with a spell checker. 2008-08-15 05:03:24 +00:00
Shorewall_and_Routing.xml Remove 'LAST LINE' anachronisms 2016-02-19 12:04:32 -08:00
Shorewall_Doesnt.xml A number of web updates 2009-01-14 22:45:31 +00:00
shorewall_extension_scripts.xml Mention lib.cli-user in the extension script article. 2015-10-30 09:09:53 -07:00
shorewall_features.xml Add Docker article 2016-02-26 15:30:39 -08:00
shorewall_logging.xml Add NFLOG as a supported mangle action 2016-05-03 11:27:34 -07:00
shorewall_prerequisites.xml Note the inadaquacy of the Busybox version of the iproute2 utilities 2009-08-17 07:17:33 -07:00
shorewall_quickstart_guide.xml Manual Updates 2015-07-26 12:51:51 -07:00
shorewall_setup_guide_fr.xml Move French language documents to the same directory as the English and Russian documents 2009-08-27 12:10:47 -07:00
shorewall_setup_guide.xml Cleanup of ORIGINAL DEST column references 2016-02-19 12:40:36 -08:00
Shorewall_Squid_Usage.xml Cleanup of ORIGINAL DEST column references 2016-02-19 12:40:36 -08:00
Shorewall-4.xml Update the Shorewall 4 article 2015-06-08 09:46:51 -07:00
Shorewall-5.xml Minor updates to the Shorewall 5 article 2016-05-18 08:19:47 -07:00
Shorewall-init.xml Correct table entry in the Shorewall-init article. 2013-03-22 14:54:18 -07:00
Shorewall-Lite.xml Updates for routestopped -> stoppedrules 2015-10-05 07:51:43 -07:00
Shorewall-perl.xml Pass both shorewallrc files to the compiler from lib.cli-std 2012-09-03 15:07:50 -07:00
simple_traffic_shaping.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
SimpleBridge.xml Update Simple Bridge article for 5.0 2016-02-19 09:46:23 -08:00
SplitDNS.xml Fix typos 2014-06-13 07:25:54 -04:00
standalone_fr.xml eliminate obsolete references to shorewall-common 2011-01-13 20:02:19 -05:00
standalone_ru.xml eliminate obsolete references to shorewall-common 2011-01-13 20:02:19 -05:00
standalone.xml Update standalone article for 5.0 2016-02-19 09:51:16 -08:00
starting_and_stopping_shorewall.xml Update start/stop article for 5.0 2016-02-19 09:57:15 -08:00
support.xml Correct trace instructions 2016-04-03 12:47:28 -07:00
survey-200603.xml Restore DOCTYPE specs 2008-07-07 20:42:54 +00:00
template.xml Abandon action.GeoIP in favor of extended syntax in the SOURCE and DEST columns. 2012-05-17 10:44:02 -07:00
three-interface_fr.xml Move French language documents to the same directory as the English and Russian documents 2009-08-27 12:10:47 -07:00
three-interface_ru.xml Finish passing through all the documentation with a spell checker. 2008-08-15 05:03:24 +00:00
three-interface.xml Use an address variable rather than find_first_interface_address() 2016-03-26 13:13:15 -07:00
traffic_shaping_ru.xml Restore DOCTYPE specs 2008-07-07 20:42:54 +00:00
traffic_shaping.xml Update the Traffic Shaping article for 5.0 2016-02-19 10:17:05 -08:00
troubleshoot.xml Update the troubleshooting doc 2014-04-21 13:00:08 -07:00
two-interface_fr.xml Move French language documents to the same directory as the English and Russian documents 2009-08-27 12:10:47 -07:00
two-interface_ru.xml Web site updates for 4.2.0 2008-10-05 21:45:05 +00:00
two-interface.xml Update the two-interface guide for 5.0 2016-02-19 10:17:20 -08:00
Universal.xml Update the Universal guide for 5.0 2016-02-19 10:17:34 -08:00
upgrade_issues.xml upgrade_issues: fix one typoed "section" and use new header for one sample 2016-02-14 21:53:13 +02:00
UPnP.xml Update the UPnP doc for 5.0 2016-02-19 10:19:27 -08:00
useful_links.xml Update outdated links, thanks to Lee Brown 2014-06-11 16:57:33 -04:00
VPN.xml Cleanup of ORIGINAL DEST column references 2016-02-19 12:40:36 -08:00
VPNBasics.xml Update the VPN Basics document for 5.0 2016-02-19 10:23:24 -08:00
Vserver.xml Update the Vserver article for 5.0 2016-02-19 10:26:10 -08:00
whitelisting_under_shorewall.xml Update the whitelisting article for 5.0 2016-02-19 10:29:41 -08:00
XenMyWay-Routed.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00
XenMyWay.xml Final cleanup of PORT(S) column headings 2016-02-19 12:31:53 -08:00