diff --git a/Shorewall-core/configure b/Shorewall-core/configure index 37f71d39d..522cb443b 100755 --- a/Shorewall-core/configure +++ b/Shorewall-core/configure @@ -28,7 +28,7 @@ # # Build updates this # -VERSION=4.5.2.1 +VERSION=4.6.12 case "$BASH_VERSION" in [4-9].*) @@ -102,7 +102,7 @@ if [ -z "$vendor" ]; then vendor=redhat ;; debian|ubuntu) - vendor=debian + ls -l /sbin/init |fgrep -q systemd | vendor=debian.systemd | vendor=debian.sysvinit ;; opensuse) vendor=suse @@ -130,7 +130,7 @@ if [ -z "$vendor" ]; then *) if [ -f /etc/debian_version ]; then params[HOST]=debian - rcfile=shorewallrc.debian + rcfile=shorewallrc.debian.sysvinit elif [ -f /etc/redhat-release ]; then params[HOST]=redhat rcfile=shorewallrc.redhat diff --git a/Shorewall-core/configure.pl b/Shorewall-core/configure.pl index f83afa03c..25e7505d4 100755 --- a/Shorewall-core/configure.pl +++ b/Shorewall-core/configure.pl @@ -31,7 +31,7 @@ use strict; # Build updates this # use constant { - VERSION => '4.5.2.1' + VERSION => '4.6.12' }; my %params; @@ -68,14 +68,16 @@ unless ( defined $vendor ) { $vendor = 'redhat'; } elsif ( $id eq 'opensuse' ) { $vendor = 'suse'; - } elsif ( $id eq 'ubuntu' ) { - $vendor = 'debian'; + } elsif ( $id eq 'ubuntu' || $id eq 'debian' ) { + my $init = `ls -l /sbin/init`; + $vendor = $init =~ /systemd/ ? 'debian.systemd' : 'debian.sysvinit'; } else { $vendor = $id; } } $params{HOST} = $vendor; + $params{HOST} =~ s/\..*//; } if ( defined $vendor ) { @@ -84,7 +86,7 @@ if ( defined $vendor ) { } else { if ( -f '/etc/debian_version' ) { $vendor = 'debian'; - $rcfilename = 'shorewallrc.debian'; + $rcfilename = 'shorewallrc.debian.sysvinit'; } elsif ( -f '/etc/redhat-release' ){ $vendor = 'redhat'; $rcfilename = 'shorewallrc.redhat'; @@ -117,7 +119,7 @@ my @abbr = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ); if ( $vendor eq 'linux' ) { printf "INFO: Creating a generic Linux installation - %s %2d %04d %02d:%02d:%02d\n\n", $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0];; } else { - printf "INFO: Creating a %s-specific installation - %s %2d %04d %02d:%02d:%02d\n\n", $vendor, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0];; + printf "INFO: Creating a %s-specific installation - %s %2d %04d %02d:%02d:%02d\n\n", $params{HOST}, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0];; } open $rcfile, '<', $rcfilename or die "Unable to open $rcfilename for input: $!"; diff --git a/Shorewall-init/shorewall-init.service b/Shorewall-init/shorewall-init.service index 5c86e99e9..6842aa531 100644 --- a/Shorewall-init/shorewall-init.service +++ b/Shorewall-init/shorewall-init.service @@ -5,9 +5,8 @@ # [Unit] Description=Shorewall firewall (bootup security) -Before=network-pre.target -Wants=network-pre.target -Conflicts=iptables.service firewalld.service +Before=network.target +Conflicts=iptables.service ip6tables.service firewalld.service [Service] Type=oneshot diff --git a/Shorewall-init/shorewall-init.service.214 b/Shorewall-init/shorewall-init.service.214 new file mode 100644 index 000000000..5c86e99e9 --- /dev/null +++ b/Shorewall-init/shorewall-init.service.214 @@ -0,0 +1,21 @@ +# +# The Shoreline Firewall (Shorewall) Packet Filtering Firewall +# +# Copyright 2011 Jonathan Underwood +# +[Unit] +Description=Shorewall firewall (bootup security) +Before=network-pre.target +Wants=network-pre.target +Conflicts=iptables.service firewalld.service + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=-/etc/sysconfig/shorewall-init +StandardOutput=syslog +ExecStart=/sbin/shorewall-init start +ExecStop=/sbin/shorewall-init stop + +[Install] +WantedBy=basic.target diff --git a/Shorewall-lite/shorewall-lite.service b/Shorewall-lite/shorewall-lite.service index 916733e01..64b7133c7 100644 --- a/Shorewall-lite/shorewall-lite.service +++ b/Shorewall-lite/shorewall-lite.service @@ -16,7 +16,6 @@ EnvironmentFile=-/etc/sysconfig/shorewall-lite StandardOutput=syslog ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS ExecStop=/sbin/shorewall-lite $OPTIONS stop -ExecReload=/sbin/shorewall-lite $OPTIONS reload $RELOADOPTIONS [Install] WantedBy=basic.target diff --git a/Shorewall-lite/shorewall-lite.service.214 b/Shorewall-lite/shorewall-lite.service.214 new file mode 100644 index 000000000..64b7133c7 --- /dev/null +++ b/Shorewall-lite/shorewall-lite.service.214 @@ -0,0 +1,21 @@ +# +# The Shoreline Firewall (Shorewall) Packet Filtering Firewall +# +# Copyright 2011 Jonathan Underwood +# +[Unit] +Description=Shorewall IPv4 firewall (lite) +Wants=network-online.target +After=network-online.target +Conflicts=iptables.service firewalld.service + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=-/etc/sysconfig/shorewall-lite +StandardOutput=syslog +ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS +ExecStop=/sbin/shorewall-lite $OPTIONS stop + +[Install] +WantedBy=basic.target diff --git a/Shorewall/shorewall.service b/Shorewall/shorewall.service index 80f6e51eb..db1bb9483 100644 --- a/Shorewall/shorewall.service +++ b/Shorewall/shorewall.service @@ -16,7 +16,6 @@ EnvironmentFile=-/etc/sysconfig/shorewall StandardOutput=syslog ExecStart=/sbin/shorewall $OPTIONS start $STARTOPTIONS ExecStop=/sbin/shorewall $OPTIONS stop -ExecReload=/sbin/shorewall $OPTIONS reload $RELOADOPTIONS [Install] WantedBy=basic.target diff --git a/Shorewall/shorewall.service.214 b/Shorewall/shorewall.service.214 new file mode 100644 index 000000000..db1bb9483 --- /dev/null +++ b/Shorewall/shorewall.service.214 @@ -0,0 +1,21 @@ +# +# The Shoreline Firewall (Shorewall) Packet Filtering Firewall +# +# Copyright 2011 Jonathan Underwood +# +[Unit] +Description=Shorewall IPv4 firewall +Wants=network-online.target +After=network-online.target +Conflicts=iptables.service firewalld.service + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=-/etc/sysconfig/shorewall +StandardOutput=syslog +ExecStart=/sbin/shorewall $OPTIONS start $STARTOPTIONS +ExecStop=/sbin/shorewall $OPTIONS stop + +[Install] +WantedBy=basic.target diff --git a/Shorewall6-lite/shorewall6-lite.service b/Shorewall6-lite/shorewall6-lite.service index f44d99bbb..151bb2d5c 100644 --- a/Shorewall6-lite/shorewall6-lite.service +++ b/Shorewall6-lite/shorewall6-lite.service @@ -14,9 +14,8 @@ Type=oneshot RemainAfterExit=yes EnvironmentFile=-/etc/sysconfig/shorewall6-lite StandardOutput=syslog -ExecStart=/sbin/shorewall6-lite $OPTIONS start +ExecStart=/sbin/shorewall6-lite $OPTIONS start $STARTOPTIONS ExecStop=/sbin/shorewall6-lite $OPTIONS stop -ExecReload=/sbin/shorewall6-lite $OPTIONS reload [Install] WantedBy=basic.target diff --git a/Shorewall6-lite/shorewall6-lite.service.214 b/Shorewall6-lite/shorewall6-lite.service.214 new file mode 100644 index 000000000..71fe51531 --- /dev/null +++ b/Shorewall6-lite/shorewall6-lite.service.214 @@ -0,0 +1,21 @@ +# +# The Shoreline Firewall (Shorewall) Packet Filtering Firewall +# +# Copyright 2011 Jonathan Underwood +# +[Unit] +Description=Shorewall IPv6 firewall (lite) +Wants=network-online.target +After=network-online.target +Conflicts=ip6tables.service firewalld.service + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=-/etc/sysconfig/shorewall6-lite +StandardOutput=syslog +ExecStart=/sbin/shorewall6-lite $OPTIONS start +ExecStop=/sbin/shorewall6-lite $OPTIONS stop + +[Install] +WantedBy=basic.target diff --git a/Shorewall6/shorewall6.service b/Shorewall6/shorewall6.service index 6c8d5d664..70aa0e430 100644 --- a/Shorewall6/shorewall6.service +++ b/Shorewall6/shorewall6.service @@ -16,7 +16,6 @@ EnvironmentFile=-/etc/sysconfig/shorewall6 StandardOutput=syslog ExecStart=/sbin/shorewall6 $OPTIONS start $STARTOPTIONS ExecStop=/sbin/shorewall6 $OPTIONS stop -ExecReload=/sbin/shorewall6 $OPTIONS reload $RELOADOPTIONS [Install] WantedBy=basic.target diff --git a/Shorewall6/shorewall6.service.214 b/Shorewall6/shorewall6.service.214 new file mode 100644 index 000000000..70aa0e430 --- /dev/null +++ b/Shorewall6/shorewall6.service.214 @@ -0,0 +1,21 @@ +# +# The Shoreline Firewall (Shorewall) Packet Filtering Firewall +# +# Copyright 2011 Jonathan Underwood +# +[Unit] +Description=Shorewall IPv6 firewall +Wants=network-online.target +After=network-online.target +Conflicts=ip6tables.service firewalld.service + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=-/etc/sysconfig/shorewall6 +StandardOutput=syslog +ExecStart=/sbin/shorewall6 $OPTIONS start $STARTOPTIONS +ExecStop=/sbin/shorewall6 $OPTIONS stop + +[Install] +WantedBy=basic.target