Hello community,
here is the log from the commit of package scsi-eventd
checked in at Sun Nov 23 09:31:51 CET 2008.
--------
--- scsi-eventd/scsi-eventd.changes 2008-10-13 16:33:30.000000000 +0200
+++ /mounts/work_src_done/STABLE/scsi-eventd/scsi-eventd.changes 2008-11-21 16:11:37.000000000 +0100
@@ -1,0 +2,8 @@
+Fri Nov 21 16:07:51 CET 2008 - hare@suse.de
+
+- Run correctly in daemon mode
+- Fixup SCSI event specifier
+- Match to the correct event type
+- Update configuration file to print out the received event
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ scsi-eventd.spec ++++++
--- /var/tmp/diff_new_pack.D29672/_old 2008-11-23 09:31:30.000000000 +0100
+++ /var/tmp/diff_new_pack.D29672/_new 2008-11-23 09:31:30.000000000 +0100
@@ -24,7 +24,7 @@
#!BuildIgnore: module-init-tools e2fsprogs udev reiserfs
AutoReqProv: on
Version: 0.1
-Release: 2
+Release: 3
Summary: SCSI event daemon
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -66,5 +66,10 @@
%config /etc/init.d/scsi-eventd
%changelog
+* Fri Nov 21 2008 hare@suse.de
+- Run correctly in daemon mode
+- Fixup SCSI event specifier
+- Match to the correct event type
+- Update configuration file to print out the received event
* Mon Oct 13 2008 hare@suse.de
- Initial package (FATE#303669, FATE#303789)
++++++ scsi-eventd-0.1.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scsi-eventd-0.1/build_rpm new/scsi-eventd-0.1/build_rpm
--- old/scsi-eventd-0.1/build_rpm 2008-10-13 16:29:26.000000000 +0200
+++ new/scsi-eventd-0.1/build_rpm 2008-11-21 16:10:36.000000000 +0100
@@ -36,8 +36,8 @@
VERSION=$(sed -n 's/Version: *\(.*\)/\1/p' scsi-eventd.spec)
-if ! which git-archive > /dev/null ; then
- echo "git-archive not found, cannot continue"
+if ! which git > /dev/null ; then
+ echo "git not found, cannot continue"
exit 1
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scsi-eventd-0.1/scsi-event.conf new/scsi-eventd-0.1/scsi-event.conf
--- old/scsi-eventd-0.1/scsi-event.conf 2008-10-13 16:29:26.000000000 +0200
+++ new/scsi-eventd-0.1/scsi-event.conf 2008-11-21 16:10:36.000000000 +0100
@@ -1,8 +1,7 @@
# Configuration file for scsi-eventd #
[fc]
-*/*/* "echo \"FC Event [%t]: Host %h vendor %v code %c len %l\""
+*/*/* "echo \"FC Event [%t]: Host %h vendor %v code %c len %l\""
[scsi]
-*/04/02/3e "" # Comment
-*/03/*/* "rescan --host %h"
+*/*/*/* "echo \"SCSI Event [%t]: Host %h LUN %l sense %k/%a/%q\""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scsi-eventd-0.1/scsi-eventd.changes new/scsi-eventd-0.1/scsi-eventd.changes
--- old/scsi-eventd-0.1/scsi-eventd.changes 1970-01-01 01:00:00.000000000 +0100
+++ new/scsi-eventd-0.1/scsi-eventd.changes 2008-11-21 16:10:36.000000000 +0100
@@ -0,0 +1,12 @@
+-------------------------------------------------------------------
+Fri Nov 21 16:07:51 CET 2008 - hare@suse.de
+
+- Run correctly in daemon mode
+- Fixup SCSI event specifier
+- Match to the correct event type
+- Update configuration file to print out the received event
+
+-------------------------------------------------------------------
+Mon Oct 13 15:48:44 CEST 2008 - hare@suse.de
+
+- Initial package (FATE#303669, FATE#303789)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scsi-eventd-0.1/src/daemon.c new/scsi-eventd-0.1/src/daemon.c
--- old/scsi-eventd-0.1/src/daemon.c 2008-10-13 16:29:26.000000000 +0200
+++ new/scsi-eventd-0.1/src/daemon.c 2008-11-21 16:10:36.000000000 +0100
@@ -35,6 +35,7 @@
int debug = 0;
int log_priority = LOG_WARNING;
char *pidfile;
+volatile int running = 0;
int pidfile_create(const char *filename, pid_t pid)
{
@@ -108,8 +109,7 @@
static void
sigend (int sig)
{
- dbg("unlink pidfile\n");
- unlink(pidfile);
+ running = 0;
}
static void
@@ -135,7 +135,6 @@
};
INIT_LIST_HEAD(&ctx.evt_list);
- logging_open("scsi-eventd");
pidfile = DEFAULT_PIDFILE;
while (1) {
@@ -173,9 +172,10 @@
} else if (!strncmp(optarg, "emergency", 9)) {
log_priority = LOG_EMERG;
} else {
- err("Invalid log priority '%s'\n", optarg);
+ fprintf(stderr, "Invalid log priority '%s'\n",
+ optarg);
retval = 1;
- goto cleanup;
+ goto exit;
}
break;
case 'p':
@@ -184,10 +184,12 @@
case 'h':
printf("Usage: %s [--config-file=<file>] [--print-events]\n", argv[0]);
retval = 1;
- goto cleanup;
+ goto exit;
}
}
+ logging_open("scsi-eventd");
+
retval = parse_scsi_event_conf(&ctx, configfile);
if (retval) {
retval = 2;
@@ -208,16 +210,18 @@
goto cleanup;
default:
warn("daemon with pid %d started\n", pid);
- retval = 0;
- goto cleanup;
+ exit(0);
}
- if (!pidfile_create("/var/run/scsi-eventd.pid", getpid())) {
+ if (pidfile_create("/var/run/scsi-eventd.pid", getpid())) {
+ dbg("Cannot create pidfile");
retval = 3;
goto cleanup;
}
}
+ dbg("installing signal handlers\n");
+
signal_set(SIGUSR1, sigusr1);
signal_set(SIGINT, sigend);
signal_set(SIGTERM, sigend);
@@ -230,14 +234,20 @@
if (fd > STDERR_FILENO)
close(fd);
+ running = 1;
+
+ dbg("Entering event loop\n");
scsi_event_loop(&ctx);
- if (daemonize)
+ dbg("Event loop finished\n");
+ if (daemonize) {
+ dbg("unlink pidfile\n");
unlink(pidfile);
-
+ }
cleanup:
free_scsi_event_conf(&ctx);
logging_close();
+exit:
return retval;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/scsi-eventd-0.1/src/events.c new/scsi-eventd-0.1/src/events.c
--- old/scsi-eventd-0.1/src/events.c 2008-10-13 16:29:26.000000000 +0200
+++ new/scsi-eventd-0.1/src/events.c 2008-11-21 16:10:36.000000000 +0100
@@ -24,6 +24,7 @@
#include