Portability: config/amanda/defaults.m4

[email protected] (Eric Schnoebelen)
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
Issue: hard-coding amanda-security.conf into /etc

Autoconf provides support for relocation of configuration files
with the sysconfdir variable.  Other portions of amanda use it,
so have the amanda-security.conf file follow the same form.


$NetBSD$

--- config/amanda/defaults.m4.orig	2016-02-09 22:52:50.000000000 +0000
+++ config/amanda/defaults.m4
@@ -125,15 +125,15 @@ AC_DEFUN([AMANDA_SETUP_DEFAULTS],
 
     AC_ARG_WITH(security-file,
         AS_HELP_STRING([--with-security-file],
-            [Full path of the security file (default: /etc/amanda-security.conf)]),
+            [Full path of the security file (default: $sysconfdir/amanda-security.conf)]),
 	    [
 	    case "$withval" in
 	        n | no) AC_MSG_ERROR([*** --without-security-file is not allowed.]);;
-	        y |  ye | yes) security_file='/etc/amanda-security.conf' ;;
+	        y |  ye | yes) security_file='$sysconfdir/amanda-security.conf' ;;
 	        *) security_file="$withval";;
 	    esac
 	    ],
-	    [security_file='/etc/amanda-security.conf']
+	    [security_file='$sysconfdir/amanda-security.conf']
     )
 
     AC_DEFINE_DIR([DEFAULT_SECURITY_FILE], [security_file],
config_amanda_defaults.m4.patch (text/plain, 923 B)
$NetBSD$

--- config/amanda/defaults.m4.orig	2016-02-09 22:52:50.000000000 +0000
+++ config/amanda/defaults.m4
@@ -125,15 +125,15 @@ AC_DEFUN([AMANDA_SETUP_DEFAULTS],
 
     AC_ARG_WITH(security-file,
         AS_HELP_STRING([--with-security-file],
-            [Full path of the security file (default: /etc/amanda-security.conf)]),
+            [Full path of the security file (default: $sysconfdir/amanda-security.conf)]),
 	    [
 	    case "$withval" in
 	        n | no) AC_MSG_ERROR([*** --without-security-file is not allowed.]);;
-	        y |  ye | yes) security_file='/etc/amanda-security.conf' ;;
+	        y |  ye | yes) security_file='$sysconfdir/amanda-security.conf' ;;
 	        *) security_file="$withval";;
 	    esac
 	    ],
-	    [security_file='/etc/amanda-security.conf']
+	    [security_file='$sysconfdir/amanda-security.conf']
     )
 
     AC_DEFINE_DIR([DEFAULT_SECURITY_FILE], [security_file],
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.