char *handler = xasprintf("./%s", event);
const char *args[] = { "run-parts", handler, NULL };
- // debug info
- if (option_mask32 & OPT_d) {
- bb_error_msg("%s", event);
- }
+ // log the event
+ bb_error_msg("%s", event);
// spawn handler
// N.B. run-parts would require scripts to have #!/bin/sh
/* No -d "Debug", we log to log file.
* This includes any output from children.
*/
- xmove_fd(xopen(opt_logfile, O_WRONLY | O_CREAT | O_TRUNC), STDOUT_FILENO);
+ xmove_fd(xopen(opt_logfile, O_WRONLY | O_CREAT | O_APPEND), STDOUT_FILENO);
xdup2(STDOUT_FILENO, STDERR_FILENO);
/* Also, acpid's messages (but not children) will go to syslog too */
openlog(applet_name, LOG_PID, LOG_DAEMON);