s-s-d now allows --signal to be used without --stop and --oknodo. man page updated accordingly

This commit is contained in:
Roy Marples
2007-04-13 09:21:16 +00:00
parent 824e9577e7
commit a07be0513a
2 changed files with 38 additions and 2 deletions

View File

@@ -680,6 +680,18 @@ int main (int argc, char **argv)
if (rc_is_env ("RC_QUIET", "yes") && ! verbose)
quiet = true;
/* Allow start-stop-daemon --signal HUP --exec /usr/sbin/dnsmasq
* instead of forcing --stop --oknodo as well */
if (! start && ! stop)
if (sig != SIGINT &&
sig != SIGTERM &&
sig != SIGQUIT &&
sig != SIGKILL)
{
oknodo = true;
stop = true;
}
if (start == stop)
eerrorx ("%s: need one of --start or --stop", progname);