]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/install-default-backend.in
Split messages line by line before sending it to syslog() fix #3325
[bacula/bacula] / bacula / src / cats / install-default-backend.in
index b456eb2a0a09fefae4ac2e823836368b95b8ca73..54bc3d092fd6724eb8c8fb410ed0e2a214dfef9c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-LIBTOOL=@LIBTOOL@
+LIBTOOL="@BUILD_DIR@/libtool"
 
 if [ $# -lt 3 ]; then
    echo "Usage: $0 <default_backend> <library_version> <install_dir>"
@@ -14,20 +14,27 @@ install_dir=$3
 #
 # Find out what the shared lib extension is for this platform.
 #
-shrext_cmds="`${LIBTOOL} --config | grep shrext_cmds`"
-eval $shrext_cmds
-if [ -z "${shrext_cmds}" ]; then
+eval `${LIBTOOL} --config | grep shrext_cmds`
+eval SHLIB_EXT=$shrext_cmds
+
+if [ -z "${SHLIB_EXT}" ]; then
    echo "Failed to determine default shared library extension"
    exit 1
 fi
 
-if [ -f ${install_dir}/libbaccats-${default_backend}-${library_version}${shrext_cmds} ]; then
+if [ -f ${install_dir}/libbaccats-${default_backend}-${library_version}${SHLIB_EXT} ]; then
    #
    # Create a default catalog library pointing to one of the shared libs.
    #
-   rm -f ${install_dir}/libbaccats-${library_version}${shrext_cmds}
-   ln -s ${install_dir}/libbaccats-${default_backend}-${library_version}${shrext_cmds} \
-         ${install_dir}/libbaccats-${library_version}${shrext_cmds}
+   rm -f ${install_dir}/libbaccats-${library_version}${SHLIB_EXT}
+
+   #
+   # Create a relative symlink to the default backend
+   # As all backends are in the same directory anyhow this should
+   # always work.
+   #
+   ln -s libbaccats-${default_backend}-${library_version}${SHLIB_EXT} \
+         ${install_dir}/libbaccats-${library_version}${SHLIB_EXT}
 fi
 
 exit 0