Commit Graph

366 Commits

Author SHA1 Message Date
Tom Eastep
e91bd9a0e9
Remove useless/empty .tmp file when SAVE_IPSETS is set
- Add SAVE_IPSETS support to the Redhat/Fedora sysv init script

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 09:28:43 -07:00
Tom Eastep
fb831e3128
Remove empty/useless ipsets tmp file in Shorewall-init
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-12 11:56:24 -07:00
Matt Darfeuille
0b3a32b365
Change the preferred way to remove sysvinit script
- Correct typo in command
 - Correct spacing

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-03-04 09:03:59 -08:00
Matt Darfeuille
a839a6f7d0
init: Add parameter files for Debian
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-03-04 09:03:49 -08:00
Matt Darfeuille
783e438b4a
Be more verbose while uninstalling Shorewall
- Remove version file as a file and not as a directory.

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:56:00 -08:00
Matt Darfeuille
a496edef54
Use a function to fail on fatal error
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:55:50 -08:00
Matt Darfeuille
c58efe7698
Unify the uninstallers
- Clean up code
 - Use the .service suffix

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:55:36 -08:00
Matt Darfeuille
f48b2e715f
Unify the installers
- Clean up code

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:55:31 -08:00
Matt Darfeuille
f6f7e691d0
Fail if the rc file can not be loaded
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:54:40 -08:00
Matt Darfeuille
315d4c39b8
Create and set directory mode using a function
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:54:04 -08:00
Matt Darfeuille
42554f8f31
Add cant_autostart() to the installers's library
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:53:59 -08:00
Matt Darfeuille
20cc56f2f1
Load uninstallers's common functions
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 17:53:39 -08:00
Matt Darfeuille
4e771083c7
Load installers's common functions
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 16:42:38 -08:00
Matt Darfeuille
a6eebc8ecf
Replace product names by product vars
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-22 16:40:41 -08:00
Tom Eastep
5174fe0161
Avoid echo options
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-12-28 11:09:08 -08:00
Tom Eastep
cabef548a6
Revert "init: Don't set the 'file' var needlessly"
This reverts commit 44e9c7780f.
2016-12-19 10:25:30 -08:00
Matt Darfeuille
fa6167797d
init: Don't set the 'file' var needlessly
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-12-19 08:14:49 -08:00
Matt Darfeuille
44e9c7780f
init: Don't set the 'file' var needlessly
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-12-19 08:14:49 -08:00
Matt Darfeuille
eb3067c006
init: Correct the filepath of .shorewallrc
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-12-18 12:14:25 -08:00
Matt Darfeuille
e4ec1c81ec
init: Add 'file' var and set path of shorewallrc
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-12-18 12:14:25 -08:00
Matt Darfeuille
d2890df8b9
init: Correct the filepath of .shorewallrc
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-12-18 12:14:25 -08:00
Matt Darfeuille
73f74ad576
init: Correct the filepath of shorewallrc
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-12-18 12:14:25 -08:00
Tom Eastep
0e40c5a4a1
Shorewall-init changes for unified CLI
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-30 15:04:40 -08:00
Roberto C. Sánchez
7c9876241c
Debian init scripts: add run-level 1 to Default-Stop specification 2016-07-04 17:37:00 -04:00
Tom Eastep
6eb8416c2b
Don't link SysV init script if $SERVICEDIR is given on Debian.
- Fixes issue with package build environment.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-06-08 15:56:56 -07:00
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
Matt Darfeuille
05a15c6f8b patches and request
Tom,

Some patches for the trunk repo(fixes.patch):

Patch1: Fix a typo in the path being printed for the standard actions
file.
Patch2: Will only install the shorewall's manpages if the variable
MANDIR is none-empty(I did it only for the sake of completeness)!
Patch3: Will only install the shorewall-lite's manpages if the
variable MANDIR is none-empty.
Patch4: Correct multiple product name's typos in
shorewall-init/install.sh.
Patch5: Remove ~/.shorewallrc when shorewall-core is uninstalled.

And two other  patches for the release repo(changelog-1.patch):

Patch1: Changed restart to reload for the line: 'Update DHCP
article(refresh -> restart).
Patch2: Rephrased the line for the newly added ?WARNING and ?INFO
directives.

Request:
Could the date of the compiled firewall script also be displayed when
'shorewall status' is executed?

-Matt

-------------- Enclosure number 2 ----------------
>From a5ae24bbe9b25aefdbcc4d7c8e5d013a36b03078 Mon Sep 17 00:00:00 2001
From: Matt Darfeuille <matdarf@gmail.com>
Date: Sat, 23 Apr 2016 14:44:19 +0200
Subject: [PATCH 1/5] Fix typo in printed path for standard actions file

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-04-27 15:07:44 -07:00
Tuomo Soini
20179a5c9d remove completely false README.txt
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2016-04-06 10:23:58 +03:00
Tom Eastep
8a02624f05 Update copyrights in the install and uninstall scripts
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-02-29 11:03:09 -08:00
Tom Eastep
2778e8c6b5 Restore debian service file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-01-05 10:56:00 -08:00
Tom Eastep
ee6a1dadbb Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2016-01-05 10:48:48 -08:00
Tuomo Soini
c447ddd03e systemd service: rename pre214 systemd versions to pre214 and remove separeate 214 variants 2016-01-05 12:01:21 +02:00
Tom Eastep
0c66e5f1b2 More Openwrt support in Shorewall-init from Matt Darfeuille
- Also, various cleanup in install/uninstall scripts

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-01-04 15:45:21 -08:00
Tom Eastep
89d91d37a1 Add Shorewall-init installer support for OpenWRT
- Supply sysconfig files for all products

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-27 16:47:31 -08:00
Tom Eastep
4b893b2fd6 Install/uninstall fixes from Matt Darfeuille
Signed-off-by: Tom Eastep <teastep@shorewall.net>

Conflicts:
	Shorewall-init/install.sh
2015-12-05 11:56:16 -08:00
Tom Eastep
4139c932a4 More configure/install/uninstall fixes from Matt Darfeuille
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-05 08:31:22 -08:00
Tom Eastep
bb538a7c10 Merge branch 'master' into 5.0.0
Conflicts:
	Shorewall-core/lib.common
	Shorewall-core/shorewallrc.debian.systemd
	Shorewall-lite/shorewall-lite.service.debian
	Shorewall/Perl/Shorewall/Chains.pm
	Shorewall/Perl/Shorewall/Compiler.pm
	Shorewall/Perl/Shorewall/Config.pm
	Shorewall/Perl/Shorewall/Misc.pm
	Shorewall/Perl/Shorewall/Raw.pm
	Shorewall/Perl/Shorewall/Tc.pm
	Shorewall/Perl/compiler.pl
	Shorewall/Perl/prog.footer
	Shorewall/lib.cli-std
	Shorewall/manpages/shorewall-mangle.xml
	Shorewall/manpages/shorewall.conf.xml
	Shorewall/manpages/shorewall.xml
	Shorewall/shorewall.service.debian
	Shorewall6-lite/shorewall6-lite.service.debian
	Shorewall6/manpages/shorewall6-mangle.xml
	Shorewall6/manpages/shorewall6.conf.xml
	Shorewall6/manpages/shorewall6.xml
	Shorewall6/shorewall6.service.debian
	docs/MultiISP.xml
	docs/Shorewall_Squid_Usage.xml
2015-10-12 10:55:36 -07:00
Tuomo Soini
f1d4ef495e shorewall-init.service*: fix [Install] section
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-09-24 18:17:30 +03:00
Tom Eastep
bde9558962 Version changes in Shorewall Init
- Also remove an obsolete comment in init.suse.sh

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-09-06 10:02:41 -07:00
Tom Eastep
4a484ced9e Delete 'conflicts=' from Shorewall-init .service files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-08-20 09:19:58 -07:00
Tom Eastep
537f53f611 Restore [Install] section in the Debian .service files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-08-17 07:41:15 -07:00
Tom Eastep
3b1ad1e284 Delete 'conflicts=' from Shorewall-init .service files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-08-17 06:40:36 -07:00
Tom Eastep
3b59e46799 Restore Debian-specific service files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-08-12 10:19:07 -07:00
Tom Eastep
56aa95ea4f Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code into 5.0.0
Conflicts:
	Shorewall-core/shorewallrc.debian.systemd
	Shorewall-init/shorewall-init.service.debian

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-08-10 17:49:00 -07:00
Tom Eastep
8657682dfd Merge branch '5.0.0' of ssh://server.shorewall.net/home/teastep/shorewall/code into 5.0.0 2015-08-08 12:43:02 -07:00
Tom Eastep
ef9e75753a Restore .214 files
- Also merge Debian changes from 4.6.12

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-08-01 11:23:35 -07:00
Tom Eastep
8bcee0ee01 Add Debian .service files
- Install both .service files and SysV init scripts on Debian.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-07-30 14:17:36 -07:00
Tom Eastep
8cddba1e15 Correct shorewall-init.service to avoid dependency loops on Debian
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-07-28 17:24:33 -07:00
Tom Eastep
cecc81ce82 Update .service files
- make the .214 versions the default and remove the ones name *.214
- Add 'ExecReload' to all but Shorewall-init
- Create Debian-specific versions with /etc/default rather than /etc/sysconfig
2015-07-26 10:58:03 -07:00
Tuomo Soini
8bc62d1474 Complete Shorewall-init improvements
completes 548c0558c1

Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-06-08 22:15:45 +03:00