Fix --name when stopping, Gentoo #243088.
This commit is contained in:
parent
1c73f2967c
commit
e1341e372b
@ -371,7 +371,7 @@ static int run_stop_schedule(const char *exec, const char *const *argv,
|
|||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
if (exec)
|
if (exec)
|
||||||
einfo ("Will stop %s\n", exec);
|
einfo ("Will stop %s", exec);
|
||||||
if (pidfile)
|
if (pidfile)
|
||||||
einfo("Will stop PID in pidfile `%s'", pidfile);
|
einfo("Will stop PID in pidfile `%s'", pidfile);
|
||||||
if (uid)
|
if (uid)
|
||||||
@ -781,14 +781,15 @@ int start_stop_daemon(int argc, char **argv)
|
|||||||
|
|
||||||
if (!exec) {
|
if (!exec) {
|
||||||
exec = *argv;
|
exec = *argv;
|
||||||
if (name)
|
if (!exec)
|
||||||
|
exec = name;
|
||||||
|
if (name && start)
|
||||||
*argv = name;
|
*argv = name;
|
||||||
} else if (name)
|
} else if (name && (start || **argv))
|
||||||
*--argv = name;
|
*--argv = name;
|
||||||
else
|
else
|
||||||
*--argv = exec;
|
*--argv = exec;
|
||||||
|
|
||||||
|
|
||||||
if (start && !exec)
|
if (start && !exec)
|
||||||
eerrorx("%s: nothing to start", applet);
|
eerrorx("%s: nothing to start", applet);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user