]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- patch from Brad Smith that fixes DESTDIR in unbound-control-setup
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Jan 2015 13:20:04 +0000 (13:20 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Jan 2015 13:20:04 +0000 (13:20 +0000)
  for installs where config is not in the prefix location.

git-svn-id: file:///svn/unbound/trunk@3297 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog
smallapp/unbound-control-setup.sh.in

index 1d230bdd2d229e76068962d9a805cee3d1d3e8ab..acfc7bc6b77fd01968d8230f26c05b3a3993edbf 100755 (executable)
--- a/configure
+++ b/configure
@@ -733,6 +733,7 @@ UNBOUND_PIDFILE
 UNBOUND_SHARE_DIR
 UNBOUND_CHROOT_DIR
 UNBOUND_RUN_DIR
+ub_conf_dir
 ub_conf_file
 EGREP
 GREP
@@ -4048,6 +4049,30 @@ cat >>confdefs.h <<_ACEOF
 #define CONFIGFILE "$hdr_config"
 _ACEOF
 
+ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
+$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ub_conf_file" : 'X\(//\)[^/]' \| \
+        X"$ub_conf_file" : 'X\(//\)$' \| \
+        X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ub_conf_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
 
 # Determine run, chroot directory and pidfile locations
 
index df59227932a913da3cb0f601c1d6b5871e87e4df..d5818818ccef58a1f5fd6fd2d58fa21f0dbbe849 100644 (file)
@@ -119,6 +119,8 @@ AC_ARG_WITH([conf_file],
 AC_SUBST(ub_conf_file)
 ACX_ESCAPE_BACKSLASH($ub_conf_file, hdr_config)
 AC_DEFINE_UNQUOTED(CONFIGFILE, ["$hdr_config"], [Pathname to the Unbound configuration file])
+ub_conf_dir=`AS_DIRNAME(["$ub_conf_file"])`
+AC_SUBST(ub_conf_dir)
 
 # Determine run, chroot directory and pidfile locations
 AC_ARG_WITH(run-dir, 
index aa6e23228d52c7b1a395b80c4e928b6c28a364c0..62d87eedb3181aa2095dd7e2ea83f41245bfbaba 100644 (file)
@@ -4,6 +4,8 @@
        - patch from Stephane Lapie that adds to the python API, that
          exposes struct delegpt, and adds the find_delegation function.
        - print query name when max target count is exceeded.
+       - patch from Brad Smith that fixes DESTDIR in unbound-control-setup
+         for installs where config is not in the prefix location.
 
 9 December 2014: Wouter
        - svn trunk has 1.5.2 in development.
index 79605dc6fd453ad07a71542f70e1eaf2850b2468..75e76e25d967c807b803b2681d7d7ea59f6839fb 100644 (file)
@@ -36,8 +36,7 @@
 # settings:
 
 # directory for files
-prefix=@prefix@
-DESTDIR=@sysconfdir@/unbound
+DESTDIR=@ub_conf_dir@
 
 # issuer and subject name for certificates
 SERVERNAME=unbound