summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2011-03-02 23:38:22 +0000
committerMilan Broz <mbroz@redhat.com>2011-03-02 23:38:22 +0000
commitfaa6ac9439391fca731fbc8e1695babe937ebe8a (patch)
treeb7ccc30974e4393f8d1051d3feb9689c81db8119 /daemons/clvmd
parent119dd6604ea698d02551fb9c695b5d4f38ff26bb (diff)
downloadlvm2-faa6ac9439391fca731fbc8e1695babe937ebe8a.tar.gz
lvm2-faa6ac9439391fca731fbc8e1695babe937ebe8a.tar.xz
lvm2-faa6ac9439391fca731fbc8e1695babe937ebe8a.zip
Fix syslog initialisation in clvmd to respect lvm.conf setting.
Diffstat (limited to 'daemons/clvmd')
-rw-r--r--daemons/clvmd/lvm-functions.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c
index 6d706242..3cf7c503 100644
--- a/daemons/clvmd/lvm-functions.c
+++ b/daemons/clvmd/lvm-functions.c
@@ -915,6 +915,10 @@ void lvm_do_fs_unlock(void)
/* Called to initialise the LVM context of the daemon */
int init_clvm(int using_gulm, char **argv)
{
+ /* Use LOG_DAEMON for syslog messages instead of LOG_USER */
+ init_syslog(LOG_DAEMON);
+ openlog("clvmd", LOG_PID, LOG_DAEMON);
+
if (!(cmd = create_toolcontext(1, NULL))) {
log_error("Failed to allocate command context");
return 0;
@@ -925,9 +929,6 @@ int init_clvm(int using_gulm, char **argv)
return 0;
}
- /* Use LOG_DAEMON for syslog messages instead of LOG_USER */
- init_syslog(LOG_DAEMON);
- openlog("clvmd", LOG_PID, LOG_DAEMON);
cmd->cmd_line = "clvmd";
/* Check lvm.conf is setup for cluster-LVM */