File move-pid-and-database-to-run-directory.patch of Package ConsoleKit
Index: ConsoleKit-0.4.5/configure.ac
===================================================================
--- ConsoleKit-0.4.5.orig/configure.ac
+++ ConsoleKit-0.4.5/configure.ac
@@ -165,7 +165,7 @@ AC_ARG_WITH(pid-file,
if ! test -z "$with_pid_file"; then
CONSOLE_KIT_PID_FILE=$with_pid_file
else
- CONSOLE_KIT_PID_FILE=${localstatedir}/run/ConsoleKit/pid
+ CONSOLE_KIT_PID_FILE=/run/ConsoleKit/pid
fi
AC_SUBST(CONSOLE_KIT_PID_FILE)
Index: ConsoleKit-0.4.5/tools/70-udev-acl.rules
===================================================================
--- ConsoleKit-0.4.5.orig/tools/70-udev-acl.rules
+++ ConsoleKit-0.4.5/tools/70-udev-acl.rules
@@ -70,7 +70,7 @@ ENV{DDC_DEVICE}=="*?", TAG+="uaccess"
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
# apply ACL for all locally logged in users
-LABEL="acl_apply", TAG=="uaccess", TEST=="/var/run/ConsoleKit/database", \
+LABEL="acl_apply", TAG=="uaccess", TEST=="/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
LABEL="acl_end"
Index: ConsoleKit-0.4.5/tools/udev-acl.c
===================================================================
--- ConsoleKit-0.4.5.orig/tools/udev-acl.c
+++ ConsoleKit-0.4.5/tools/udev-acl.c
@@ -130,7 +130,7 @@ static GSList *uids_with_local_active_se
GKeyFile *keyfile;
keyfile = g_key_file_new();
- if (g_key_file_load_from_file(keyfile, "/var/run/ConsoleKit/database", 0, NULL)) {
+ if (g_key_file_load_from_file(keyfile, "/run/ConsoleKit/database", 0, NULL)) {
gchar **groups;
groups = g_key_file_get_groups(keyfile, NULL);
Index: ConsoleKit-0.4.5/src/ck-manager.c
===================================================================
--- ConsoleKit-0.4.5.orig/src/ck-manager.c
+++ ConsoleKit-0.4.5/src/ck-manager.c
@@ -181,8 +181,8 @@ ck_manager_dump (CkManager *manager)
{
int fd;
int res;
- const char *filename = LOCALSTATEDIR "/run/ConsoleKit/database";
- const char *filename_tmp = LOCALSTATEDIR "/run/ConsoleKit/database~";
+ const char *filename = "/run/ConsoleKit/database";
+ const char *filename_tmp = "/run/ConsoleKit/database~";
if (manager == NULL) {
return;
@@ -190,11 +190,11 @@ ck_manager_dump (CkManager *manager)
/* always make sure we have a directory */
errno = 0;
- res = g_mkdir_with_parents (LOCALSTATEDIR "/run/ConsoleKit",
+ res = g_mkdir_with_parents ("/run/ConsoleKit",
S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
if (res < 0) {
g_warning ("Unable to create directory %s (%s)",
- LOCALSTATEDIR "/run/ConsoleKit",
+ "/run/ConsoleKit",
g_strerror (errno));
return;
}