File tinyca2-defaults.patch of Package tinyca2
diff -up tinyca2-0.7.6-20070611/tinyca2.defaults tinyca2-0.7.6-20070611/tinyca2
--- tinyca2-0.7.6-20070611/tinyca2.defaults 2007-03-22 09:52:22.000000000 +0200
+++ tinyca2-0.7.6-20070611/tinyca2 2011-03-18 09:57:09.000000000 +0200
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
-BEGIN { unshift(@INC, './lib'); # put here the location of the modules
+BEGIN { unshift(@INC, '/usr/share/tinyca2'); # put here the location of the modules
}
use strict;
@@ -62,7 +62,7 @@ sub usage
print STDERR "To administer more than one CA, call \"tinyca2 --ManageCA\"\n\n";
setlocale(LC_MESSAGES, "");
-bindtextdomain("tinyca2", "./locale/");
+bindtextdomain("tinyca2", "/usr/share/locale/");
textdomain("tinyca2");
# https://bugs.gentoo.org/show_bug.cgi?id=78576
@@ -99,7 +99,7 @@ if(not -x $init->{'tarbin'}) {
}
# directory with the templates
-$init->{'templatedir'} = "./templates";
+$init->{'templatedir'} = "/etc/tinyca2";
if(not -d $init->{'templatedir'}) {
print gettext("Can't find templatedir.\n");
@@ -108,8 +108,17 @@ if(not -d $init->{'templatedir'}) {
}
# location for CA files
-$init->{'basedir'} = $ENV{HOME}."/.TinyCA";
-$init->{'exportdir'} = $ENV{HOME};
+if( exists $ENV{'TINYCA_BASEDIR'}) {
+ $init->{'basedir'} = $ENV{'TINYCA_BASEDIR'}
+} else {
+ $init->{'basedir'} = $ENV{HOME}."/.TinyCA";
+}
+
+if( exists $ENV{'TINYCA_EXPORTDIR'}) {
+ $init->{'exportdir'} = $ENV{'TINYCA_EXPORTDIR'};
+} else {
+ $init->{'exportdir'} = $ENV{HOME};
+}
umask(0077);