summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2011-06-15 16:59:39 -0700
committerBob Gilligan <gilligan@vyatta.com>2011-06-15 16:59:39 -0700
commit3fc5d448cdc043c815b177ade72305d970c9f84c (patch)
tree7b3565abfa0410c883c9cbfb45b8cce2c4562c3f
parentf54e0757c8559945a8c40f3847799f2a92ecf2bf (diff)
downloadvyatta-cfg-3fc5d448cdc043c815b177ade72305d970c9f84c.tar.gz
vyatta-cfg-3fc5d448cdc043c815b177ade72305d970c9f84c.zip
Bugfix 6767: Move log files from /tmp to /var/log/vyatta.
-rwxr-xr-xscripts/vyatta-boot-config-loader4
-rwxr-xr-xscripts/vyatta-cfg-cmd-wrapper8
-rwxr-xr-xscripts/vyatta-config-loader.pl2
-rw-r--r--src/cli_val.h4
-rw-r--r--src/cstore/cstore.cpp2
5 files changed, 11 insertions, 9 deletions
diff --git a/scripts/vyatta-boot-config-loader b/scripts/vyatta-boot-config-loader
index 3872974..d7359fb 100755
--- a/scripts/vyatta-boot-config-loader
+++ b/scripts/vyatta-boot-config-loader
@@ -4,9 +4,9 @@ BOOT_FILE=$1
shift
CAPI=/bin/cli-shell-api
-CLOG=/tmp/vyatta-config-loader.log
+CLOG=/var/log/vyatta/vyatta-config-loader.log
COMMIT=/opt/vyatta/sbin/my_commit
-COMMIT_LOG=/tmp/vyatta-commit.log
+COMMIT_LOG=/var/log/vyatta/vyatta-commit.log
do_log () {
local level=$1
diff --git a/scripts/vyatta-cfg-cmd-wrapper b/scripts/vyatta-cfg-cmd-wrapper
index b0ec349..952112f 100755
--- a/scripts/vyatta-cfg-cmd-wrapper
+++ b/scripts/vyatta-cfg-cmd-wrapper
@@ -26,6 +26,8 @@
export vyatta_sysconfdir=/opt/vyatta/etc
export vyatta_sbindir=/opt/vyatta/sbin
+LOGFILE=/var/log/vyatta/vyatta-commit.log
+
# allow env variable to override default session id (ppid). this enables
# the script to handle cases where the invocations can come from
# different parents.
@@ -68,9 +70,9 @@ case "$1" in
;;
commit)
export COMMIT_VIA=cfg-cmd-wrapper
- ${vyatta_sbindir}/my_commit -a >> /tmp/vyatta-commit.log
- ${vyatta_sbindir}/my_commit -s >> /tmp/vyatta-commit.log
- exec ${vyatta_sbindir}/my_commit -e -d >> /tmp/vyatta-commit.log
+ ${vyatta_sbindir}/my_commit -a >> $LOGFILE
+ ${vyatta_sbindir}/my_commit -s >> $LOGFILE
+ exec ${vyatta_sbindir}/my_commit -e -d >> $LOGFILE
;;
commit_with_error)
exec ${vyatta_sbindir}/my_commit
diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl
index 168a8ea..c5a1164 100755
--- a/scripts/vyatta-config-loader.pl
+++ b/scripts/vyatta-config-loader.pl
@@ -29,7 +29,7 @@ use Sys::Syslog qw(:standard :macros);
use POSIX qw(strftime);
my $CWRAPPER = '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper';
-my $CONFIG_LOG = '/tmp/vyatta-config-loader.log';
+my $CONFIG_LOG = '/var/log/vyatta/vyatta-config-loader.log';
my $COMMIT_CMD = "$CWRAPPER commit";
my $CLEANUP_CMD = "$CWRAPPER cleanup";
my $BEGIN_CMD = "$CWRAPPER begin";
diff --git a/src/cli_val.h b/src/cli_val.h
index 9d987d3..3538402 100644
--- a/src/cli_val.h
+++ b/src/cli_val.h
@@ -100,8 +100,8 @@ extern void release_config_lock(void);
#define OPQ_NAME ".wh.__dir_opaque"
/*** output ***/
-#define LOGFILE_STDOUT "/tmp/cfg-stdout.log"
-#define LOGFILE_STDERR "/tmp/cfg-stderr.log"
+#define LOGFILE_STDOUT "/var/log/vyatta/cfg-stdout.log"
+#define LOGFILE_STDERR "/var/log/vyatta/cfg-stderr.log"
extern int out_fd;
extern FILE *err_stream;
diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp
index ce937c9..9a5961f 100644
--- a/src/cstore/cstore.cpp
+++ b/src/cstore/cstore.cpp
@@ -68,7 +68,7 @@ const string Cstore::C_ENV_SHAPI_HELP_STRS = "_cli_shell_api_hstrs";
//// dirs/files
const string Cstore::C_ENUM_SCRIPT_DIR = "/opt/vyatta/share/enumeration";
-const string Cstore::C_LOGFILE_STDOUT = "/tmp/cfg-stdout.log";
+const string Cstore::C_LOGFILE_STDOUT = "/var/log/vyatta/cfg-stdout.log";
//// sorting
const unsigned int Cstore::SORT_DEFAULT = 0;