[Rt-commit] r11944 - rt/branches/3.8-TESTING/sbin
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Apr 28 21:59:56 EDT 2008
Author: sunnavy
Date: Mon Apr 28 21:59:56 2008
New Revision: 11944
Modified:
rt/branches/3.8-TESTING/sbin/rt-setup-database.in
Log:
make rt-setup-database work well with relative paths
Modified: rt/branches/3.8-TESTING/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.8-TESTING/sbin/rt-setup-database.in (original)
+++ rt/branches/3.8-TESTING/sbin/rt-setup-database.in Mon Apr 28 21:59:56 2008
@@ -51,6 +51,14 @@
use vars qw($Nobody $SystemUser $item);
+# we need to chdir first because maybe @LOCAL_LIB_PATH@ and @RT_LIB_PATH@ are
+# relative paths, and we mostly run this script in source dir instead of
+# installed dir
+
+BEGIN {
+ chdir "@RT_PATH@" if -e "@RT_PATH@" && "@RT_LIB_PATH@" !~ m{^/};
+}
+
use lib "@LOCAL_LIB_PATH@";
use lib "@RT_LIB_PATH@";
More information about the Rt-commit
mailing list