summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumpf <kumpf>2007-06-22 17:45:50 +0000
committerkumpf <kumpf>2007-06-22 17:45:50 +0000
commiteb7bd5bc60e8ced765d6574b92a559eeb540a3b7 (patch)
tree8dd2a68351c2282e69d8cb256acbe70fe645e571
parent53f743f03d80ca4f962da33f6e59b5497ce191db (diff)
downloadtog-pegasus-eb7bd5bc60e8ced765d6574b92a559eeb540a3b7.zip
tog-pegasus-eb7bd5bc60e8ced765d6574b92a559eeb540a3b7.tar.gz
tog-pegasus-eb7bd5bc60e8ced765d6574b92a559eeb540a3b7.tar.xz
BUG#: 6568
TITLE: CIM Server start-up lock file should be in same directory as PID file DESCRIPTION: Use a fully-pathed lock file in the default build. Improve the name of the macro used for the start-up lock file name.
-rw-r--r--Makefile.Release10
-rw-r--r--env_var_Linux.status2
-rw-r--r--rpm/tog-pegasus.spec4
-rw-r--r--rpm/tog-specfiles/tog-pegasus-preun.spec2
-rw-r--r--src/Pegasus/Common/Constants.h55
-rw-r--r--src/Server/cimserver.cpp2
6 files changed, 39 insertions, 36 deletions
diff --git a/Makefile.Release b/Makefile.Release
index b58bf07..82d2717 100644
--- a/Makefile.Release
+++ b/Makefile.Release
@@ -786,10 +786,10 @@ ifdef PEGASUS_OVERRIDE_DEFAULT_RELEASE_DIRS
@$(ECHO-E) "# define PEGASUS_PROVIDER_AGENT_PROC_NAME" \
"\""$(PEGASUS_SBIN_DIR)/cimprovagt"\"" \
>> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
- @$(ECHO-E) "# undef CIMSERVER_LOCK_FILE" \
+ @$(ECHO-E) "# undef PEGASUS_CIMSERVER_START_LOCK_FILE" \
>> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
- @$(ECHO-E) "# define CIMSERVER_LOCK_FILE" \
- "\""$(CIMSERVER_LOCK_FILE)"\"" \
+ @$(ECHO-E) "# define PEGASUS_CIMSERVER_START_LOCK_FILE" \
+ "\""$(PEGASUS_CIMSERVER_START_LOCK_FILE)"\"" \
>> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
@$(ECHO-E) "# undef PEGASUS_PLANNED_CONFIG_FILE_PATH" \
>> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
@@ -1114,8 +1114,8 @@ endif
@$(ECHO-E) "%global PEGASUS_CIMSERVER_START_FILE" \
"$(PEGASUS_CIMSERVER_START_FILE)" \
>> $(PEGASUS_RPM_SPEC_FILE_PATH)
- @$(ECHO-E) "%global CIMSERVER_LOCK_FILE" \
- "$(CIMSERVER_LOCK_FILE)" \
+ @$(ECHO-E) "%global PEGASUS_CIMSERVER_START_LOCK_FILE" \
+ "$(PEGASUS_CIMSERVER_START_LOCK_FILE)" \
>> $(PEGASUS_RPM_SPEC_FILE_PATH)
@$(ECHO-E) "%global PEGASUS_REPOSITORY_DIR $(PEGASUS_REPOSITORY_DIR)" \
>> $(PEGASUS_RPM_SPEC_FILE_PATH)
diff --git a/env_var_Linux.status b/env_var_Linux.status
index 44661a1..e568ce6 100644
--- a/env_var_Linux.status
+++ b/env_var_Linux.status
@@ -81,7 +81,7 @@ PEGASUS_CONFIG_DIR = /etc/Pegasus
PEGASUS_VARRUN_DIR = /var/run/tog-pegasus
PEGASUS_CIMSERVER_START_FILE = $(PEGASUS_VARRUN_DIR)/cimserver.pid
-CIMSERVER_LOCK_FILE = $(PEGASUS_VARRUN_DIR)/cimserver_start.lock
+PEGASUS_CIMSERVER_START_LOCK_FILE = $(PEGASUS_VARRUN_DIR)/cimserver_start.lock
PEGASUS_LOCAL_DOMAIN_SOCKET_DIR = $(PEGASUS_VARRUN_DIR)/socket
PEGASUS_LOCAL_DOMAIN_SOCKET_PATH = \
$(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)/cimxml.socket
diff --git a/rpm/tog-pegasus.spec b/rpm/tog-pegasus.spec
index 9dd6773..a36aa40 100644
--- a/rpm/tog-pegasus.spec
+++ b/rpm/tog-pegasus.spec
@@ -152,7 +152,7 @@ sources.
%global PEGASUS_VARDATA_CACHE_DIR /var/lib/Pegasus/cache
%global PEGASUS_LOCAL_DOMAIN_SOCKET_PATH /var/run/tog-pegasus/socket/cimxml.socket
%global PEGASUS_CIMSERVER_START_FILE /var/run/tog-pegasus/cimserver.pid
-%global CIMSERVER_LOCK_FILE /var/run/tog-pegasus/cimserver_start.lock
+%global PEGASUS_CIMSERVER_START_LOCK_FILE /var/run/tog-pegasus/cimserver_start.lock
%global PEGASUS_REPOSITORY_DIR /var/lib/Pegasus/repository
%global PEGASUS_PREV_REPOSITORY_DIR_NAME prev_repository
%global PEGASUS_REPOSITORY_PARENT_DIR /var/lib/Pegasus
@@ -373,7 +373,7 @@ if [ $1 -eq 0 ]; then
[ -d %PEGASUS_VARDATA_CACHE_DIR ] && rm -rf %PEGASUS_VARDATA_CACHE_DIR;
rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
rm -f %PEGASUS_CIMSERVER_START_FILE;
- rm -f %CIMSERVER_LOCK_FILE;
+ rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
fi
#
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
diff --git a/rpm/tog-specfiles/tog-pegasus-preun.spec b/rpm/tog-specfiles/tog-pegasus-preun.spec
index ef8d175..e06cf73 100644
--- a/rpm/tog-specfiles/tog-pegasus-preun.spec
+++ b/rpm/tog-specfiles/tog-pegasus-preun.spec
@@ -14,7 +14,7 @@ if [ $1 -eq 0 ]; then
[ -d %PEGASUS_VARDATA_CACHE_DIR ] && rm -rf %PEGASUS_VARDATA_CACHE_DIR;
rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
rm -f %PEGASUS_CIMSERVER_START_FILE;
- rm -f %CIMSERVER_LOCK_FILE;
+ rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
fi
#
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
diff --git a/src/Pegasus/Common/Constants.h b/src/Pegasus/Common/Constants.h
index f5408bb..6e42218 100644
--- a/src/Pegasus/Common/Constants.h
+++ b/src/Pegasus/Common/Constants.h
@@ -194,8 +194,10 @@
# include <Pegasus/Common/ProductDirectoryStructure.h>
#else
# if defined(PEGASUS_OS_HPUX)
-# undef CIMSERVER_LOCK_FILE
-# define CIMSERVER_LOCK_FILE "/var/opt/wbem/cimserver_start.lock"
+# undef PEGASUS_CIMSERVER_START_FILE
+# define PEGASUS_CIMSERVER_START_FILE "/etc/opt/wbem/cimserver_start.conf"
+# undef PEGASUS_CIMSERVER_START_LOCK_FILE
+# define PEGASUS_CIMSERVER_START_LOCK_FILE "/var/opt/wbem/cimserver_start.lock"
# undef PEGASUS_REPOSITORY_DIR
# define PEGASUS_REPOSITORY_DIR "/var/opt/wbem/repository"
# undef PEGASUS_CURRENT_CONFIG_FILE_PATH
@@ -204,8 +206,6 @@
# undef PEGASUS_PLANNED_CONFIG_FILE_PATH
# define PEGASUS_PLANNED_CONFIG_FILE_PATH \
"/var/opt/wbem/cimserver_planned.conf"
-# undef PEGASUS_CIMSERVER_START_FILE
-# define PEGASUS_CIMSERVER_START_FILE "/etc/opt/wbem/cimserver_start.conf"
# undef PEGASUS_SSLCLIENT_CERTIFICATEFILE
# define PEGASUS_SSLCLIENT_CERTIFICATEFILE "/etc/opt/hp/sslshare/client.pem"
# undef PEGASUS_SSLCLIENT_RANDOMFILE
@@ -223,8 +223,10 @@
# undef PEGASUS_PROVIDER_AGENT_PROC_NAME
# define PEGASUS_PROVIDER_AGENT_PROC_NAME "/opt/wbem/lbin/cimprovagt"
# elif defined(PEGASUS_OS_AIX)
-# undef CIMSERVER_LOCK_FILE
-# define CIMSERVER_LOCK_FILE \
+# undef PEGASUS_CIMSERVER_START_FILE
+# define PEGASUS_CIMSERVER_START_FILE "/tmp/cimserver_start.conf"
+# undef PEGASUS_CIMSERVER_START_LOCK_FILE
+# define PEGASUS_CIMSERVER_START_LOCK_FILE \
"/opt/freeware/cimom/pegasus/etc/cimserver_start.lock"
# undef PEGASUS_REPOSITORY_DIR
# define PEGASUS_REPOSITORY_DIR \
@@ -235,8 +237,6 @@
# undef PEGASUS_PLANNED_CONFIG_FILE_PATH
# define PEGASUS_PLANNED_CONFIG_FILE_PATH \
"/opt/freeware/cimom/pegasus/etc/cimserver_planned.conf"
-# undef PEGASUS_CIMSERVER_START_FILE
-# define PEGASUS_CIMSERVER_START_FILE "/tmp/cimserver_start.conf"
# undef PEGASUS_SSLCLIENT_CERTIFICATEFILE
# define PEGASUS_SSLCLIENT_CERTIFICATEFILE \
"/opt/freeware/cimom/pegasus/etc/client.pem"
@@ -253,9 +253,11 @@
# define PEGASUS_PAM_STANDALONE_PROC_NAME \
"/opt/freeware/cimom/pegasus/bin/cimservera"
# elif defined(PEGASUS_OS_LINUX)
-# undef CIMSERVER_LOCK_FILE
-# define CIMSERVER_LOCK_FILE \
- "/var/opt/tog-pegasus/cimserver_start.lock"
+# undef PEGASUS_CIMSERVER_START_FILE
+# define PEGASUS_CIMSERVER_START_FILE "/var/run/tog-pegasus/cimserver.pid"
+# undef PEGASUS_CIMSERVER_START_LOCK_FILE
+# define PEGASUS_CIMSERVER_START_LOCK_FILE \
+ "/var/run/tog-pegasus/cimserver_start.lock"
# undef PEGASUS_REPOSITORY_DIR
# define PEGASUS_REPOSITORY_DIR "/var/opt/tog-pegasus/repository"
# undef PEGASUS_CURRENT_CONFIG_FILE_PATH
@@ -264,8 +266,6 @@
# undef PEGASUS_PLANNED_CONFIG_FILE_PATH
# define PEGASUS_PLANNED_CONFIG_FILE_PATH \
"/var/opt/tog-pegasus/cimserver_planned.conf"
-# undef PEGASUS_CIMSERVER_START_FILE
-# define PEGASUS_CIMSERVER_START_FILE "/var/run/tog-pegasus/cimserver.pid"
# undef PEGASUS_SSLCLIENT_CERTIFICATEFILE
# define PEGASUS_SSLCLIENT_CERTIFICATEFILE "/etc/opt/tog-pegasus/client.pem"
# undef PEGASUS_SSLCLIENT_RANDOMFILE
@@ -285,8 +285,11 @@
# undef PEGASUS_PROVIDER_AGENT_PROC_NAME
# define PEGASUS_PROVIDER_AGENT_PROC_NAME "/opt/tog-pegasus/sbin/cimprovagt"
# elif defined(PEGASUS_OS_VMS)
-# undef CIMSERVER_LOCK_FILE
-# define CIMSERVER_LOCK_FILE \
+# undef PEGASUS_CIMSERVER_START_FILE
+# define PEGASUS_CIMSERVER_START_FILE \
+ "/wbem_var/opt/wbem/cimserver_start.conf"
+# undef PEGASUS_CIMSERVER_START_LOCK_FILE
+# define PEGASUS_CIMSERVER_START_LOCK_FILE \
"/wbem_var/opt/wbem/cimserver_start.lock"
# undef PEGASUS_REPOSITORY_DIR
# define PEGASUS_REPOSITORY_DIR "/wbem_var/opt/wbem/repository"
@@ -296,9 +299,6 @@
# undef PEGASUS_PLANNED_CONFIG_FILE_PATH
# define PEGASUS_PLANNED_CONFIG_FILE_PATH \
"/wbem_var/opt/wbem/cimserver_planned.conf"
-# undef PEGASUS_CIMSERVER_START_FILE
-# define PEGASUS_CIMSERVER_START_FILE \
- "/wbem_var/opt/wbem/cimserver_start.conf"
# undef PEGASUS_SSLCLIENT_CERTIFICATEFILE
# define PEGASUS_SSLCLIENT_CERTIFICATEFILE \
"/wbem_etc/opt/hp/sslshare/client.pem"
@@ -323,21 +323,27 @@
# undef PEGASUS_LOCAL_DOMAIN_SOCKET_PATH
# define PEGASUS_LOCAL_DOMAIN_SOCKET_PATH "/var/wbem/cimxml.socket"
# elif defined(PEGASUS_OS_DARWIN)
+# undef PEGASUS_CIMSERVER_START_FILE
+# define PEGASUS_CIMSERVER_START_FILE \
+ "/var/cache/pegasus/cimserver_start.conf"
+# undef PEGASUS_CIMSERVER_START_LOCK_FILE
+# define PEGASUS_CIMSERVER_START_LOCK_FILE \
+ "/var/cache/pegasus/cimserver_start.lock"
# undef PEGASUS_CURRENT_CONFIG_FILE_PATH
# define PEGASUS_CURRENT_CONFIG_FILE_PATH \
"/etc/pegasus/cimserver_current.conf"
# undef PEGASUS_PLANNED_CONFIG_FILE_PATH
# define PEGASUS_PLANNED_CONFIG_FILE_PATH \
"/etc/pegasus/cimserver_planned.conf"
-# undef PEGASUS_CIMSERVER_START_FILE
-# define PEGASUS_CIMSERVER_START_FILE \
- "/var/cache/pegasus/cimserver_start.conf"
# endif
#endif
#endif
-#ifndef CIMSERVER_LOCK_FILE
-#define CIMSERVER_LOCK_FILE "cimserver_start.lock"
+#ifndef PEGASUS_CIMSERVER_START_FILE
+#define PEGASUS_CIMSERVER_START_FILE "/tmp/cimserver_start.conf"
+#endif
+#ifndef PEGASUS_CIMSERVER_START_LOCK_FILE
+#define PEGASUS_CIMSERVER_START_LOCK_FILE "/tmp/cimserver_start.lock"
#endif
#ifndef PEGASUS_REPOSITORY_DIR
#define PEGASUS_REPOSITORY_DIR "repository"
@@ -348,9 +354,6 @@
#ifndef PEGASUS_PLANNED_CONFIG_FILE_PATH
#define PEGASUS_PLANNED_CONFIG_FILE_PATH "cimserver_planned.conf"
#endif
-#ifndef PEGASUS_CIMSERVER_START_FILE
-#define PEGASUS_CIMSERVER_START_FILE "/tmp/cimserver_start.conf"
-#endif
#ifndef PEGASUS_SSLCLIENT_CERTIFICATEFILE
#define PEGASUS_SSLCLIENT_CERTIFICATEFILE "client.pem"
#endif
diff --git a/src/Server/cimserver.cpp b/src/Server/cimserver.cpp
index 9d129ac..43c4723 100644
--- a/src/Server/cimserver.cpp
+++ b/src/Server/cimserver.cpp
@@ -775,7 +775,7 @@ int CIMServerProcess::cimserver_run(
// starting at the same time.
//
CString startupLockFileName = ConfigManager::getHomedPath(
- CIMSERVER_LOCK_FILE).getCString();
+ PEGASUS_CIMSERVER_START_LOCK_FILE).getCString();
// Make sure the start-up lock file exists
FILE* startupLockFile;