libstoragemgmt/move_to_run.patch

101 lines
3.8 KiB
Diff
Raw Normal View History

bsc#1185067, migrate /var/run to /run.
Index: libstoragemgmt-1.9.3/c_binding/lsm_datatypes.cpp
===================================================================
--- libstoragemgmt-1.9.3.orig/c_binding/lsm_datatypes.cpp
+++ libstoragemgmt-1.9.3/c_binding/lsm_datatypes.cpp
@@ -52,7 +52,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-#define LSM_DEFAULT_PLUGIN_DIR "/var/run/lsm/ipc"
+#define LSM_DEFAULT_PLUGIN_DIR "/run/lsm/ipc"
int lsm_string_list_append(lsm_string_list *sl, const char *value) {
int rc = LSM_ERR_INVALID_ARGUMENT;
Index: libstoragemgmt-1.9.3/daemon/lsm_daemon.c
===================================================================
--- libstoragemgmt-1.9.3.orig/daemon/lsm_daemon.c
+++ libstoragemgmt-1.9.3/daemon/lsm_daemon.c
@@ -44,7 +44,7 @@
#include <syslog.h>
#include <unistd.h>
-#define BASE_DIR "/var/run/lsm"
+#define BASE_DIR "/run/lsm"
#define SOCKET_DIR BASE_DIR "/ipc"
#define PLUGIN_DIR "/usr/bin"
#define LSM_USER "libstoragemgmt"
Index: libstoragemgmt-1.9.3/packaging/daemon/libstoragemgmt.conf
===================================================================
--- libstoragemgmt-1.9.3.orig/packaging/daemon/libstoragemgmt.conf
+++ libstoragemgmt-1.9.3/packaging/daemon/libstoragemgmt.conf
@@ -1,2 +1,2 @@
-D /var/run/lsm 0775 root libstoragemgmt -
-D /var/run/lsm/ipc 0775 root libstoragemgmt -
+D /run/lsm 0775 root libstoragemgmt -
+D /run/lsm/ipc 0775 root libstoragemgmt -
Index: libstoragemgmt-1.9.3/packaging/daemon/libstoragemgmtd
===================================================================
--- libstoragemgmt-1.9.3.orig/packaging/daemon/libstoragemgmtd
+++ libstoragemgmt-1.9.3/packaging/daemon/libstoragemgmtd
@@ -15,7 +15,7 @@
NAME=lsmd
PROG=/usr/bin/$NAME
-PID=/var/run/lsm/lsmd.pid
+PID=/run/lsm/lsmd.pid
LOCK=/var/lock/subsys/libstoragemgmtd
RETVAL=0
@@ -27,8 +27,8 @@ if [ "`id -u`" != 0 ] ; then
fi
check_dirs() {
- test -d /var/run/lsm || mkdir -p /var/run/lsm/ipc
- test -d /var/run/lsm/ipc || mkdir -p /var/run/lsm/ipc
+ test -d /run/lsm || mkdir -p /run/lsm/ipc
+ test -d /run/lsm/ipc || mkdir -p /run/lsm/ipc
}
status_lsm() {
Index: libstoragemgmt-1.9.3/packaging/libstoragemgmt.spec
===================================================================
--- libstoragemgmt-1.9.3.orig/packaging/libstoragemgmt.spec
+++ libstoragemgmt-1.9.3/packaging/libstoragemgmt.spec
@@ -264,7 +264,7 @@ popd
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
- useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
+ useradd -r -g libstoragemgmt -d /run/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" libstoragemgmt
%post
Index: libstoragemgmt-1.9.3/packaging/libstoragemgmt.spec.in
===================================================================
--- libstoragemgmt-1.9.3.orig/packaging/libstoragemgmt.spec.in
+++ libstoragemgmt-1.9.3/packaging/libstoragemgmt.spec.in
@@ -264,7 +264,7 @@ popd
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
- useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
+ useradd -r -g libstoragemgmt -d /run/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" libstoragemgmt
%post
Index: libstoragemgmt-1.9.3/python_binding/lsm/_common.py
===================================================================
--- libstoragemgmt-1.9.3.orig/python_binding/lsm/_common.py
+++ libstoragemgmt-1.9.3/python_binding/lsm/_common.py
@@ -151,7 +151,7 @@ class Proxy(object):
# variable in client and specified on the command line for the daemon
-UDS_PATH = '/var/run/lsm/ipc'
+UDS_PATH = '/run/lsm/ipc'
# Set to True for verbose logging
LOG_VERBOSE = True