From a3494c10072103f9d52ce3cc7689c3f24d0b958c Mon Sep 17 00:00:00 2001 From: Sven R Date: Thu, 13 Feb 2020 07:34:31 +0100 Subject: [PATCH 1/5] make deinstall: avoid removing bastille.conf --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6e7aaec..70e6749 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,8 @@ uninstall: @rm -rvf /usr/local/share/bastille @echo @echo "removing configuration file" - @rm -rvf /usr/local/etc/bastille + @rm -rvf /usr/local/etc/bastille/bastille.conf.sample @echo @echo "removing startup script" @rm -vf /usr/local/etc/rc.d/bastille + @echo "You may need to manually remove /usr/local/etc/bastille/bastille.conf if it is no longer needed." From 2fa9f34be603e3f5fa69edeff1a1aba088b0f414 Mon Sep 17 00:00:00 2001 From: Sven R Date: Wed, 19 Feb 2020 08:34:23 +0100 Subject: [PATCH 2/5] lint remove EOL release (reduce size of README) --- README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 05b09da..828db65 100644 --- a/README.md +++ b/README.md @@ -121,9 +121,9 @@ table persist nat on $ext_if from to any -> ($ext_if) ## static rdr example -## rdr pass inet proto tcp from any to any port {80, 443} -> 10.17.89.45 +# rdr pass inet proto tcp from any to any port {80, 443} -> 10.17.89.45 -# Enable dynamic rdr (see below) +## Enable dynamic rdr (see below) rdr-anchor "rdr/*" block in all @@ -131,7 +131,7 @@ pass out quick modulate state antispoof for $ext_if inet pass in inet proto tcp from any to any port ssh flags S/SA keep state -# make sure you also open up ports that you are going to use for dynamic rdr +## make sure you also open up ports that you are going to use for dynamic rdr # pass in inet proto tcp from any to any port : flags S/SA keep state # pass in inet proto udp from any to any port : flags S/SA keep state @@ -241,11 +241,6 @@ release version as the argument. ishmael ~ # bastille bootstrap 11.3-RELEASE ``` -**FreeBSD 12.0-RELEASE** -```shell -ishmael ~ # bastille bootstrap 12.0-RELEASE -``` - **FreeBSD 12.1-RELEASE** ```shell ishmael ~ # bastille bootstrap 12.1-RELEASE From c342b5cdc0dbda610b65eace019ca984a75f11f4 Mon Sep 17 00:00:00 2001 From: Sven R Date: Tue, 25 Feb 2020 12:37:01 +0100 Subject: [PATCH 3/5] fix_import --- usr/local/share/bastille/import.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/import.sh b/usr/local/share/bastille/import.sh index 4e886df..21d4412 100644 --- a/usr/local/share/bastille/import.sh +++ b/usr/local/share/bastille/import.sh @@ -179,7 +179,7 @@ fi # Check if archive exist then trim archive name if [ "$(ls "${bastille_backupsdir}" | awk "/^${TARGET}$/")" ]; then - TARGET_TRIM=$(echo ${TARGET} | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*:[0-9]*:[0-9]*.[txz]\{2,3\}//") + TARGET_TRIM=$(echo ${TARGET} | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*[0-9]*[0-9]*.[txz]\{2,3\}//") else error_notify "${COLOR_RED}Archive '${TARGET}' not found.${COLOR_RESET}" fi From 73e97ab18f5dba98372d3f100559dba1c5c3f687 Mon Sep 17 00:00:00 2001 From: Sven R Date: Tue, 25 Feb 2020 12:43:16 +0100 Subject: [PATCH 4/5] fix_import --- usr/local/share/bastille/import.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/import.sh b/usr/local/share/bastille/import.sh index 21d4412..c851b53 100644 --- a/usr/local/share/bastille/import.sh +++ b/usr/local/share/bastille/import.sh @@ -179,7 +179,7 @@ fi # Check if archive exist then trim archive name if [ "$(ls "${bastille_backupsdir}" | awk "/^${TARGET}$/")" ]; then - TARGET_TRIM=$(echo ${TARGET} | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*[0-9]*[0-9]*.[txz]\{2,3\}//") + TARGET_TRIM=$(echo ${TARGET} | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*.[txz]\{2,3\}//") else error_notify "${COLOR_RED}Archive '${TARGET}' not found.${COLOR_RESET}" fi From 659517b595ee50d32d84162fe71d54c39fb0c70e Mon Sep 17 00:00:00 2001 From: Sven R Date: Tue, 25 Feb 2020 12:48:52 +0100 Subject: [PATCH 5/5] fix_import --- usr/local/share/bastille/import.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/share/bastille/import.sh b/usr/local/share/bastille/import.sh index c851b53..238c8dc 100644 --- a/usr/local/share/bastille/import.sh +++ b/usr/local/share/bastille/import.sh @@ -178,8 +178,8 @@ if [ ! -d "${bastille_backupsdir}" ]; then fi # Check if archive exist then trim archive name -if [ "$(ls "${bastille_backupsdir}" | awk "/^${TARGET}$/")" ]; then - TARGET_TRIM=$(echo ${TARGET} | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*.[txz]\{2,3\}//") +if ls "${bastille_backupsdir}" | awk "/^${TARGET}$/"; then + TARGET_TRIM=$(echo "${TARGET}" | sed "s/_[0-9]*-[0-9]*-[0-9]*-[0-9]*.[txz]\{2,3\}//g;s/_[0-9]*-[0-9]*-[0-9]*.zip//g") else error_notify "${COLOR_RED}Archive '${TARGET}' not found.${COLOR_RESET}" fi