Fix --name when stopping, Gentoo #243088.

This commit is contained in:
Roy Marples 2008-10-30 16:26:05 +00:00
parent 1c73f2967c
commit e1341e372b

View File

@ -371,7 +371,7 @@ static int run_stop_schedule(const char *exec, const char *const *argv,
if (verbose) {
if (exec)
einfo ("Will stop %s\n", exec);
einfo ("Will stop %s", exec);
if (pidfile)
einfo("Will stop PID in pidfile `%s'", pidfile);
if (uid)
@ -781,14 +781,15 @@ int start_stop_daemon(int argc, char **argv)
if (!exec) {
exec = *argv;
if (name)
if (!exec)
exec = name;
if (name && start)
*argv = name;
} else if (name)
} else if (name && (start || **argv))
*--argv = name;
else
*--argv = exec;
if (start && !exec)
eerrorx("%s: nothing to start", applet);