Skip to content

Apache Lucene open-source search software

SOLR-682: Add free bsd support to scripts

Grant Ingersoll954abed4b250
diff --git a/CHANGES.txt b/CHANGES.txt
index 0a6912d2726..55476a3ce92 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -583,6 +583,8 @@ Other Changes
links more resilient to configs loaded via an InputStream
(Lars Kotthoff, hossman)
+21. SOLR-682: Scripts now support FreeBSD (Richard Trey Hyde via gsingers)
+
Build
1. SOLR-411. Changed the names of the Solr JARs to use the defacto standard JAR names based on
project-name-version.jar. This yields, for example:
diff --git a/src/scripts/abc b/src/scripts/abc
index 285f7291402..64e85733d75 100755
--- a/src/scripts/abc
+++ b/src/scripts/abc
@@ -175,7 +175,7 @@ trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_d
# make a backup using hard links into temporary location
# then move it into place atomically
-if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" ]]
+if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
then
orig_dir=$(pwd)
mkdir ${data_dir}/${temp}
diff --git a/src/scripts/abo b/src/scripts/abo
index 03c1b44b0c4..a42f7c47e7a 100755
--- a/src/scripts/abo
+++ b/src/scripts/abo
@@ -175,7 +175,7 @@ trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_d
# make a backup using hard links into temporary location
# then move it into place atomically
-if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" ]]
+if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD"]]
then
orig_dir=$(pwd)
mkdir ${data_dir}/${temp}
diff --git a/src/scripts/backup b/src/scripts/backup
index 89ee5f667bd..7584028d8da 100755
--- a/src/scripts/backup
+++ b/src/scripts/backup
@@ -101,7 +101,7 @@ logMessage making backup ${data_dir}/${name}
# make a backup using hard links into temporary location
# then move it into place atomically
-if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" ]]
+if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
then
orig_dir=$(pwd)
mkdir ${data_dir}/${temp}
diff --git a/src/scripts/snapcleaner b/src/scripts/snapcleaner
index 0111c2c1d89..8c1cae62c3e 100755
--- a/src/scripts/snapcleaner
+++ b/src/scripts/snapcleaner
@@ -91,7 +91,7 @@ fi
function remove
{
- if [[ "${OS}" == "Darwin" ]]
+ if [[ "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
then
syncing=`ps -www -U ${user} |grep -w rsync|grep -v grep|grep -w $1`
else
diff --git a/src/scripts/snapinstaller b/src/scripts/snapinstaller
index 67f0229889d..ec94201e299 100755
--- a/src/scripts/snapinstaller
+++ b/src/scripts/snapinstaller
@@ -141,7 +141,7 @@ fi
# install using hard links into temporary directory
# remove original index and then atomically copy new one into place
logMessage installing snapshot ${name}
-if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" ]]
+if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
then
orig_dir=$(pwd)
mkdir ${data_dir}/index.tmp$$ && \
diff --git a/src/scripts/snappuller b/src/scripts/snappuller
index 4b6b98abffb..fd081ca31f4 100755
--- a/src/scripts/snappuller
+++ b/src/scripts/snappuller
@@ -200,7 +200,7 @@ fi
# take a snapshot of current index so that only modified files will be rsync-ed
# put the snapshot in the 'work-in-progress" directory to prevent it from
# being installed while the copying is still in progress
-if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" ]]
+if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
then
orig_dir=$(pwd)
mkdir ${data_dir}/${name}-wip