diff options
-rw-r--r-- | src/daemon/Daemon.cpp | 9 | ||||
-rw-r--r-- | src/daemon/abrt-action-save-package-data.c | 18 | ||||
-rw-r--r-- | src/daemon/abrt-handle-crashdump.c | 8 | ||||
-rw-r--r-- | src/daemon/abrt-server.c | 4 | ||||
-rw-r--r-- | src/plugins/abrt-action-analyze-c.c | 20 | ||||
-rw-r--r-- | src/plugins/abrt-action-analyze-oops.c | 20 | ||||
-rw-r--r-- | src/plugins/abrt-action-analyze-python.c | 18 | ||||
-rw-r--r-- | src/plugins/abrt-action-bugzilla.cpp | 25 | ||||
-rw-r--r-- | src/plugins/abrt-action-generate-backtrace.c | 22 | ||||
-rw-r--r-- | src/plugins/abrt-action-kerneloops.c | 25 | ||||
-rw-r--r-- | src/plugins/abrt-action-mailx.c | 14 | ||||
-rw-r--r-- | src/plugins/abrt-action-print.c | 7 | ||||
-rw-r--r-- | src/plugins/abrt-action-rhtsupport.c | 25 | ||||
-rw-r--r-- | src/plugins/abrt-action-upload.c | 14 |
14 files changed, 104 insertions, 125 deletions
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp index 7e19bcaf..5dd273e7 100644 --- a/src/daemon/Daemon.cpp +++ b/src/daemon/Daemon.cpp @@ -549,6 +549,7 @@ int main(int argc, char** argv) OPT_d = 1 << 1, OPT_s = 1 << 2, OPT_t = 1 << 3, + OPT_p = 1 << 4, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { @@ -556,12 +557,11 @@ int main(int argc, char** argv) OPT_BOOL( 'd', NULL, NULL , _("Do not daemonize")), OPT_BOOL( 's', NULL, NULL , _("Log to syslog even with -d")), OPT_INTEGER('t', NULL, &s_timeout, _("Exit after SEC seconds of inactivity")), + OPT_BOOL( 'p', NULL, NULL , _("Add program names to log")), OPT_END() }; unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); - unsetenv("ABRT_SYSLOG"); - putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); /* When dbus daemon starts us, it doesn't set PATH * (I saw it set only DBUS_STARTER_ADDRESS and DBUS_STARTER_BUS_TYPE). * In this case, set something sane: @@ -569,7 +569,12 @@ int main(int argc, char** argv) const char *env_path = getenv("PATH"); if (!env_path || !env_path[0]) putenv((char*)"PATH=/usr/sbin:/usr/bin:/sbin:/bin"); + + unsetenv("ABRT_SYSLOG"); + putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); msg_prefix = PROGNAME; /* for log(), error_msg() and such */ + if (opts & OPT_p) + putenv((char*)"ABRT_PROG_PREFIX=1"); if (opts & OPT_s) start_syslog_logging(); diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c index 8f54b96c..34905b60 100644 --- a/src/daemon/abrt-action-save-package-data.c +++ b/src/daemon/abrt-action-save-package-data.c @@ -249,31 +249,27 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [options] -d DIR\n" + PROGNAME" [-v] -d DIR\n" "\n" "Query package database and save package name, component, and description" ); enum { OPT_v = 1 << 0, OPT_d = 1 << 1, - OPT_s = 1 << 2, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Crash dump directory")), - OPT_BOOL( 's', NULL, NULL , _("Log to syslog")), + OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Dump directory")), OPT_END() }; - unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); + /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - //msg_prefix = PROGNAME; - if (opts & OPT_s) - { - openlog(PROGNAME, 0, LOG_DAEMON); - logmode = LOGMODE_SYSLOG; - } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; VERB1 log("Loading settings"); if (load_settings() != 0) diff --git a/src/daemon/abrt-handle-crashdump.c b/src/daemon/abrt-handle-crashdump.c index e7847c5f..3c3e433f 100644 --- a/src/daemon/abrt-handle-crashdump.c +++ b/src/daemon/abrt-handle-crashdump.c @@ -43,7 +43,7 @@ int main(int argc, char **argv) PROGNAME" [-vs]" /*" [-c CONFFILE]"*/ " -d DIR -e EVENT\n" " or: "PROGNAME" [-vs]" /*" [-c CONFFILE]"*/ " [-d DIR] -l[PFX]\n" "\n" - "Handle crash dump according to rules in abrt_event.conf" + "Handles dump directory DIR according to rules in abrt_event.conf" ); enum { OPT_v = 1 << 0, @@ -51,15 +51,17 @@ int main(int argc, char **argv) OPT_d = 1 << 2, OPT_e = 1 << 3, OPT_l = 1 << 4, + OPT_p = 1 << 5, // OPT_c = 1 << ?, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), OPT_BOOL( 's', NULL, NULL , _("Log to syslog" )), - OPT_STRING( 'd', NULL, &dump_dir_name, "DIR" , _("Crash dump directory")), + OPT_STRING( 'd', NULL, &dump_dir_name, "DIR" , _("Dump directory")), OPT_STRING( 'e', NULL, &event , "EVENT" , _("Handle EVENT" )), OPT_OPTSTRING('l', NULL, &pfx , "PFX" , _("List possible events [which start with PFX]")), + OPT_BOOL( 'p', NULL, NULL , _("Add program names to log")), // OPT_STRING( 'c', NULL, &conf_filename, "CONFFILE", _("Configuration file" )), OPT_END() }; @@ -69,6 +71,8 @@ int main(int argc, char **argv) putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); msg_prefix = PROGNAME; + if (opts & OPT_p) + putenv((char*)"ABRT_PROG_PREFIX=1"); if (opts & OPT_s) { openlog(msg_prefix, 0, LOG_DAEMON); diff --git a/src/daemon/abrt-server.c b/src/daemon/abrt-server.c index 0c45e3e8..9d4a2310 100644 --- a/src/daemon/abrt-server.c +++ b/src/daemon/abrt-server.c @@ -289,18 +289,22 @@ int main(int argc, char **argv) OPT_v = 1 << 0, OPT_u = 1 << 1, OPT_s = 1 << 2, + OPT_p = 1 << 3, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), OPT_INTEGER('u', NULL, &client_uid, _("Use UID as client uid")), OPT_BOOL( 's', NULL, NULL , _("Log to syslog")), + OPT_BOOL( 'p', NULL, NULL , _("Add program names to log")), OPT_END() }; unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); msg_prefix = xasprintf(PROGNAME"[%u]", getpid()); + if (opts & OPT_p) + putenv((char*)"ABRT_PROG_PREFIX=1"); if (opts & OPT_s) { openlog(msg_prefix, 0, LOG_DAEMON); diff --git a/src/plugins/abrt-action-analyze-c.c b/src/plugins/abrt-action-analyze-c.c index 635a3316..3c7d4f1d 100644 --- a/src/plugins/abrt-action-analyze-c.c +++ b/src/plugins/abrt-action-analyze-c.c @@ -153,31 +153,27 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-v] -d DIR\n\n" - "Calculates and saves UUID of coredumps" + PROGNAME" [-v] -d DIR\n" + "\n" + "Calculates and saves UUID of coredump in dump directory DIR" ); enum { OPT_v = 1 << 0, OPT_d = 1 << 1, -// OPT_s = 1 << 2, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Crash dump directory")), -// OPT_BOOL( 's', NULL, NULL, _("Log to syslog" )), + OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Dump directory")), OPT_END() }; /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - msg_prefix = PROGNAME; -//Maybe we will want this... later -// if (opts & OPT_s) -// { -// openlog(msg_prefix, 0, LOG_DAEMON); -// logmode = LOGMODE_SYSLOG; -// } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; /* Run unstrip -n and trim its output, leaving only sizes and build ids */ diff --git a/src/plugins/abrt-action-analyze-oops.c b/src/plugins/abrt-action-analyze-oops.c index 0072c71d..97a7cbf5 100644 --- a/src/plugins/abrt-action-analyze-oops.c +++ b/src/plugins/abrt-action-analyze-oops.c @@ -130,31 +130,27 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-vs] -d DIR\n\n" - "Calculates and saves UUID and DUPHASH of oops crash dumps" + PROGNAME" [-vs] -d DIR\n" + "\n" + "Calculates and saves UUID and DUPHASH for oops dump directory DIR" ); enum { OPT_v = 1 << 0, OPT_d = 1 << 1, -// OPT_s = 1 << 2, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Crash dump directory")), -// OPT_BOOL( 's', NULL, NULL, _("Log to syslog" )), + OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Dump directory")), OPT_END() }; /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - msg_prefix = PROGNAME; -//Maybe we will want this... later -// if (opts & OPT_s) -// { -// openlog(msg_prefix, 0, LOG_DAEMON); -// logmode = LOGMODE_SYSLOG; -// } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (!dd) diff --git a/src/plugins/abrt-action-analyze-python.c b/src/plugins/abrt-action-analyze-python.c index feffb439..44e2d4b8 100644 --- a/src/plugins/abrt-action-analyze-python.c +++ b/src/plugins/abrt-action-analyze-python.c @@ -35,31 +35,27 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-v] -d DIR\n\n" + PROGNAME" [-v] -d DIR\n" + "\n" "Calculates and saves UUID and DUPHASH of python crash dumps" ); enum { OPT_v = 1 << 0, OPT_d = 1 << 1, -// OPT_s = 1 << 2, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Crash dump directory")), -// OPT_BOOL( 's', NULL, NULL, _("Log to syslog" )), + OPT_STRING('d', NULL, &dump_dir_name, "DIR", _("Dump directory")), OPT_END() }; /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - msg_prefix = PROGNAME; -//Maybe we will want this... later -// if (opts & OPT_s) -// { -// openlog(msg_prefix, 0, LOG_DAEMON); -// logmode = LOGMODE_SYSLOG; -// } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (!dd) diff --git a/src/plugins/abrt-action-bugzilla.cpp b/src/plugins/abrt-action-bugzilla.cpp index 79e83b3b..abc3fa1a 100644 --- a/src/plugins/abrt-action-bugzilla.cpp +++ b/src/plugins/abrt-action-bugzilla.cpp @@ -908,34 +908,29 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-vs] -c CONFFILE -d DIR" + PROGNAME" [-v] -c CONFFILE -d DIR\n" "\n" - "\nReport a crash to Bugzilla" + "Reports problem to Bugzilla" ); enum { OPT_v = 1 << 0, - OPT_s = 1 << 1, - OPT_d = 1 << 2, - OPT_c = 1 << 3, + OPT_d = 1 << 1, + OPT_c = 1 << 2, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_BOOL( 's', NULL, NULL , _("Log to syslog")), - OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Crash dump directory")), + OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")), OPT_LIST( 'c', NULL, &conf_file , "FILE", _("Configuration file (may be given many times)")), OPT_END() }; - unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); + /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); -//DONT! our stdout/stderr goes directly to daemon, don't want to have prefix there. -// msg_prefix = xasprintf(PROGNAME"[%u]", getpid()); - if (opts & OPT_s) - { - openlog(msg_prefix, 0, LOG_DAEMON); - logmode = LOGMODE_SYSLOG; - } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; while (conf_file) { diff --git a/src/plugins/abrt-action-generate-backtrace.c b/src/plugins/abrt-action-generate-backtrace.c index 7defc9c4..445a7b76 100644 --- a/src/plugins/abrt-action-generate-backtrace.c +++ b/src/plugins/abrt-action-generate-backtrace.c @@ -254,33 +254,31 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [options] -d DIR" + PROGNAME" [options] -d DIR\n" + "\n" + "Generates and saves backtrace for coredump in dump directory DIR" ); enum { OPT_v = 1 << 0, OPT_d = 1 << 1, OPT_i = 1 << 2, OPT_t = 1 << 3, - OPT_s = 1 << 4, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_STRING( 'd', NULL, &dump_dir_name , "DIR" , _("Crash dump directory")), - OPT_STRING( 'i', NULL, &i_opt , "dir1[:dir2]...", _("Additional debuginfo directories")), + OPT_STRING( 'd', NULL, &dump_dir_name , "DIR" , _("Dump directory")), + OPT_STRING( 'i', NULL, &i_opt , "DIR1[:DIR2]...", _("Additional debuginfo directories")), OPT_INTEGER('t', NULL, &exec_timeout_sec, _("Kill gdb if it runs for more than N seconds")), - OPT_BOOL( 's', NULL, NULL , _("Log to syslog")), OPT_END() }; - unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); + /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - //msg_prefix = PROGNAME; - if (opts & OPT_s) - { - openlog(msg_prefix, 0, LOG_DAEMON); - logmode = LOGMODE_SYSLOG; - } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; if (i_opt) { diff --git a/src/plugins/abrt-action-kerneloops.c b/src/plugins/abrt-action-kerneloops.c index fdcf4182..72ec80e3 100644 --- a/src/plugins/abrt-action-kerneloops.c +++ b/src/plugins/abrt-action-kerneloops.c @@ -130,34 +130,29 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-vs] -c CONFFILE -d DIR" + PROGNAME" [-v] -c CONFFILE -d DIR\n" "\n" - "\nReport a kernel oops to kerneloops.org (or similar) site" + "Reports kernel oops to kerneloops.org (or similar) site" ); enum { OPT_v = 1 << 0, - OPT_s = 1 << 1, - OPT_d = 1 << 2, - OPT_c = 1 << 3, + OPT_d = 1 << 1, + OPT_c = 1 << 2, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_BOOL( 's', NULL, NULL , _("Log to syslog")), - OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Crash dump directory")), + OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")), OPT_LIST( 'c', NULL, &conf_file , "FILE", _("Configuration file (may be given many times)")), OPT_END() }; - unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); + /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); -//DONT! our stdout/stderr goes directly to daemon, don't want to have prefix there. -// msg_prefix = xasprintf(PROGNAME"[%u]", getpid()); - if (opts & OPT_s) - { - openlog(msg_prefix, 0, LOG_DAEMON); - logmode = LOGMODE_SYSLOG; - } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; while (conf_file) { diff --git a/src/plugins/abrt-action-mailx.c b/src/plugins/abrt-action-mailx.c index f9e82b04..dcea685b 100644 --- a/src/plugins/abrt-action-mailx.c +++ b/src/plugins/abrt-action-mailx.c @@ -134,7 +134,7 @@ int main(int argc, char **argv) const char *program_usage_string = _( PROGNAME" [-v] -d DIR [-c CONFFILE]\n" "\n" - "Upload compressed tarball of crash dump" + "Sends compressed tarball of dump directory DIR via email" ); enum { OPT_v = 1 << 0, @@ -144,19 +144,17 @@ int main(int argc, char **argv) /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Crash dump directory")), + OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")), OPT_STRING('c', NULL, &conf_file , "CONFFILE", _("Config file")), OPT_END() }; /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - //msg_prefix = PROGNAME; - //if (opts & OPT_s) - //{ - // openlog(msg_prefix, 0, LOG_DAEMON); - // logmode = LOGMODE_SYSLOG; - //} + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; map_string_h *settings = new_map_string(); if (conf_file) diff --git a/src/plugins/abrt-action-print.c b/src/plugins/abrt-action-print.c index f34fd014..be2179a5 100644 --- a/src/plugins/abrt-action-print.c +++ b/src/plugins/abrt-action-print.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) const char *program_usage_string = _( PROGNAME" [-v] -d DIR [-o FILE] [-a yes/no]\n" "\n" - "Print problem information to standard output or FILE" + "Prints problem information to standard output or FILE" ); enum { OPT_v = 1 << 0, @@ -57,7 +57,10 @@ int main(int argc, char **argv) /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - //msg_prefix = PROGNAME; + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; if (output_file) { diff --git a/src/plugins/abrt-action-rhtsupport.c b/src/plugins/abrt-action-rhtsupport.c index 9175fdec..03274268 100644 --- a/src/plugins/abrt-action-rhtsupport.c +++ b/src/plugins/abrt-action-rhtsupport.c @@ -262,34 +262,29 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-vs] -c CONFFILE -d DIR" + PROGNAME" [-v] -c CONFFILE -d DIR\n" "\n" - "\nReport a crash to RHTSupport" + "Reports a problem to RHTSupport" ); enum { OPT_v = 1 << 0, - OPT_s = 1 << 1, - OPT_d = 1 << 2, - OPT_c = 1 << 3, + OPT_d = 1 << 1, + OPT_c = 1 << 2, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_BOOL( 's', NULL, NULL , _("Log to syslog")), - OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Crash dump directory")), + OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")), OPT_LIST( 'c', NULL, &conf_file , "FILE", _("Configuration file (may be given many times)")), OPT_END() }; - unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); + /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); -//DONT! our stdout/stderr goes directly to daemon, don't want to have prefix there. -// msg_prefix = xasprintf(PROGNAME"[%u]", getpid()); - if (opts & OPT_s) - { - openlog(msg_prefix, 0, LOG_DAEMON); - logmode = LOGMODE_SYSLOG; - } + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; while (conf_file) { diff --git a/src/plugins/abrt-action-upload.c b/src/plugins/abrt-action-upload.c index 8556e142..beb09beb 100644 --- a/src/plugins/abrt-action-upload.c +++ b/src/plugins/abrt-action-upload.c @@ -245,7 +245,7 @@ int main(int argc, char **argv) const char *program_usage_string = _( PROGNAME" [-v] -d DIR [-c CONFFILE] [-u URL]\n" "\n" - "Upload compressed tarball of crash dump" + "Uploads compressed tarball of dump directory DIR" ); enum { OPT_v = 1 << 0, @@ -256,7 +256,7 @@ int main(int argc, char **argv) /* Keep enum above and order of options below in sync! */ struct options program_options[] = { OPT__VERBOSE(&g_verbose), - OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Crash dump directory")), + OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")), OPT_STRING('c', NULL, &conf_file , "CONFFILE", _("Config file")), OPT_STRING('u', NULL, &url , "URL" , _("Base URL to upload to")), OPT_END() @@ -264,12 +264,10 @@ int main(int argc, char **argv) /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - //msg_prefix = PROGNAME; - //if (opts & OPT_s) - //{ - // openlog(msg_prefix, 0, LOG_DAEMON); - // logmode = LOGMODE_SYSLOG; - //} + + char *pfx = getenv("ABRT_PROG_PREFIX"); + if (pfx && string_to_bool(pfx)) + msg_prefix = PROGNAME; map_string_h *settings = new_map_string(); if (url) |