From 32653435ae349f3c7b8ead1c6f92a931b77cbe48 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 28 Jul 2010 15:14:10 -0700 Subject: [PATCH] - Move cores to /tmp - ;-terminate categories in the desktop file - Add make dist/version code to Makefile - Rev to 0.7 --- Makefile | 6 +++++- coredump.c | 4 ++-- corewatcher-applet.desktop | 2 +- corewatcher.init | 3 +-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7afbe10..57e9365 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ - +VERSION = 0.7 # # to build this package, you need to have the following components installed: # dbus-glib-devel libnotify-devel gtk2-devel curl-devel @@ -92,4 +92,8 @@ tests: corewatcher valgrind: corewatcher tests valgrind -q --leak-check=full ./corewatcher --debug test/*.txt +dist: + git tag v$(VERSION) + git archive --format=tar --prefix="corewatcher-$(VERSION)/" v$(VERSION) | \ + gzip > corewatcher-$(VERSION).tar.gz diff --git a/coredump.c b/coredump.c index 55c9330..b7ebe6a 100644 --- a/coredump.c +++ b/coredump.c @@ -128,7 +128,7 @@ int scan_dmesg(void __unused *unused) struct dirent *entry; char path[PATH_MAX*2]; - dir = opendir("/var/cores/"); + dir = opendir("/tmp/"); if (!dir) return 1; @@ -141,7 +141,7 @@ int scan_dmesg(void __unused *unused) continue; if (strstr(entry->d_name, "processed")) continue; - sprintf(path, "/var/cores/%s", entry->d_name); + sprintf(path, "/tmp/%s", entry->d_name); printf("Looking at %s\n", path); process_corefile(path); } while (entry); diff --git a/corewatcher-applet.desktop b/corewatcher-applet.desktop index e1de660..5badcc7 100644 --- a/corewatcher-applet.desktop +++ b/corewatcher-applet.desktop @@ -5,6 +5,6 @@ Icon=stock_alarm Exec=corewatcher-applet Terminal=false Type=Application -Categories=Application;System;Utility +Categories=Application;System;Utility; X-GNOME-Autostart-enabled=true X-MeeGo-Priority=Low diff --git a/corewatcher.init b/corewatcher.init index 98a0b6a..b9bb3b4 100755 --- a/corewatcher.init +++ b/corewatcher.init @@ -34,8 +34,7 @@ lockfile=/var/lock/subsys/$prog start() { echo -n $"Starting $prog:" - mkdir /var/cores &> /dev/null - echo /var/cores/core > /proc/sys/kernel/core_pattern + echo /tmp/core > /proc/sys/kernel/core_pattern daemon $prog $OPTS retval=$? echo -- 2.7.4