Commit Graph

86 Commits

Author SHA1 Message Date
William Hubbs
9e989227ab start-stop-daemon: remove the verbose variable
Along the same lines as the quiet variable, this is controlled by an
environment variable for the einfo code, so we do not need a separate
boolean flag.
2013-09-24 01:47:17 -05:00
William Hubbs
d6436bed09 start-stop-daemon: remove the quiet variable
The suppression of output is controlled in the e* functions themselves,
so there is no need for a variable to test in start-stop-daemon.

X-Gentoo-Bug: 482396
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
2013-09-23 17:28:39 -05:00
William Hubbs
5c3e5d801b start-stop-daemon: remove redundant test of the quiet value
The einfo() function tests for the EINFO_QUIET environment variable
directly, and this is the variable that is set by the --quiet flag, so
there was no reason for this test to exist.
2013-08-26 17:09:18 -05:00
William Hubbs
bb8a9c087d start-stop-daemon: fix --quiet switch
The --quiet switch wasn't really quiet, because we changed it to report
errors. I am changing it back due to discussions on the listed bugs.

X-Gentoo-Bug: 482396
X-Gentoo-Bug: 439174
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439174
2013-08-26 15:51:11 -05:00
Gary
9ebd5a6aff Add support for DragonFly BSD 2013-07-25 22:33:24 -05:00
William Hubbs
20af890ac2 Spacing fixes 2012-10-17 18:47:36 -05:00
Christian Ruppert
3cd293c515 Silence the right get_pid() call 2012-09-12 21:35:55 +02:00
Christian Ruppert
a06072b395 Silence get_pid(), OpenRC will give the process some time to create the PID file and the first get__pid() call may fail. 2012-09-12 21:00:20 +02:00
Christian Ruppert
9afdf50667 Do not silence errors 2012-08-19 00:26:38 +02:00
Mike Frysinger
0813a80223 add a new ARRAY_SIZE macro and use it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-06 01:17:30 -04:00
William Hubbs
3272261479 Skip pam if running as root
Reported-by: Piotr Karbowski <piotr.karbowski@gmail.com>
X-Gentoo-Bug: 386623
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=386623
2012-02-23 16:47:52 -06:00
Mike Frysinger
c7cc685458 rc: fix style around case_RC_COMMON_GETOPT
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-19 02:33:11 -05:00
Mike Frysinger
16661d02e9 ssd: fix building when SYS_ioprio_set is missing
Older glibc's might not provide this.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-09 00:09:58 -05:00
Diego
b71f3bd2fd Start-stop-daemon: remove call to pam_authenticate 2011-09-01 17:08:55 -05:00
Christian Ruppert
70a3a3cf39 Add --startas/-a back to the optstring
X-Gentoo-Bug: 373609
X-Gentoo-Bug-URL: https://bugs.gentoo.org/373609
2011-06-30 20:21:48 +02:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
Joe Harvell
24ba795563 Only print the deprecation warning for --chuid/-c when using it
The deprecation warning has been printed when using the replecement functions as
well, bug 373243.
2011-06-27 23:20:47 +02:00
Christian Ruppert
4eb37f67cf Warn if deprecated commandline options are used for start-stop-daemon 2011-06-05 16:49:12 +02:00
Mike Frysinger
711713d664 start-stop-daemon: use termios.h rather than sys/termios.h
POSIX specifies termios.h, not sys/termios.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:48:13 -05:00
Robin H. Johnson
0c93f4df32 Style fix: "while (" not "while(". 2011-01-17 08:42:28 +00:00
Robin H. Johnson
e6fc30da61 Clean up all trailing whitespace in src/. 2011-01-17 08:28:43 +00:00
Roy Marples
dc3ccd8101 start-stop-daemon can now set process IO scheduling. 2009-12-14 08:47:48 +00:00
William Hubbs
c96a015742 fix wait time for gentoo bug 288495
The wait time was in seconds.  This patch converts it to milliseconds.
2009-10-15 20:25:01 +01:00
Roy Marples
44585fea46 Add -P to start-stop-daemon to display a . for each second elapsed.
Fixes #197.
2009-09-04 15:41:08 +01:00
Roy Marples
6e485bde39 Really fix --signal 0 2009-09-04 13:32:59 +01:00
Roy Marples
2ea1df634e Fix signed error. 2009-09-04 13:24:26 +01:00
Roy Marples
7012630302 Allow any valid numeric signal and not just what we define. 2009-09-01 13:57:45 +01:00
Roy Marples
c0fd1b49e4 Move non compiled libraries from /lib/rc to /libexec/rc
OpenRC version is now stored as plaintext in /libexec/rc/version

Plugins (cursplash, splashutils) will have to be re-compiled to pickup
the new directories. State data needs to be moved from /lib/rc/init.d
to /libexec/rc/init.d as well.
2009-05-23 20:38:12 +01:00
Roy Marples
b2eb9f8a83 Unset PAM environment variables if not set 2009-05-07 12:20:59 +01:00
Roy Marples
658a220638 Add (c) to Copyright 2009-05-01 15:11:40 +01:00
Roy Marples
3d0e5175d8 Avoid more gcc warning about not checking return values ... 2009-04-30 19:56:43 +01:00
Roy Marples
ade85d4bd8 Improve style for KNF 2009-04-23 21:31:22 +00:00
Roy Marples
f326f688f6 Add the -i, --interpreted option.
This enables the code to include the daemons interpreter when matching
process name which fixes bug #164.
Existing init scripts that rely on the old behaviour will need to be 
fixed.
2009-04-22 10:45:01 +00:00
Roy Marples
ee53e6ad29 -w, --wait seconds
New option so you can set the number of seconds to wait for and
check the daemon is still running.
The old code that periodically polled wasn't that reliable - in this 
case simpler == better.
Fixes #160
2009-04-19 18:20:49 +00:00
Roy Marples
069590d97f Fix unmask option, thanks to douglas@openplans.org, #146 2009-02-10 23:11:17 +00:00
Roy Marples
a52472c3c3 Fix ordering, #139 thanks to Matthias. 2009-01-12 10:24:47 +00:00
Roy Marples
a33554ab18 Copyright 2009-01-11 17:17:04 +00:00
Roy Marples
baf0ce64f5 Ensure that $HOME and $USER are always set, #139 2009-01-11 17:09:13 +00:00
Roy Marples
f4b8366942 Parse retry schedule correctly, #129. Thanks to vaeth. 2008-12-28 14:05:33 +00:00
Roy Marples
53e2bec385 We should match on the correct args for stopping daemons when pidfiles
are not being used.
2008-12-23 10:15:41 +00:00
Roy Marples
fe509db660 Save a needless malloc when re-creating PATH. 2008-11-12 10:55:42 +00:00
Roy Marples
937b1b2abf Don't set user info unless stated. 2008-11-11 19:47:30 +00:00
Roy Marples
eafbed0366 Fix stopping with a faulty pidfile. 2008-11-10 20:57:03 +00:00
Roy Marples
8a76c27325 Fix sending signals, #121. 2008-11-03 21:06:45 +00:00
Roy Marples
895c4f4149 Plug a leak and expand exec also. 2008-10-30 17:57:58 +00:00
Roy Marples
20380d3144 Allow ~ and ~user to expand for chdir and chroot. 2008-10-30 17:40:48 +00:00
Roy Marples
e1341e372b Fix --name when stopping, Gentoo #243088. 2008-10-30 16:26:05 +00:00
Roy Marples
53ddd6ca96 Properly set PAM enviornment variables after opening session.
Without this change, modules like pam_mktemp or pam_env and similar
will be unable to change users' environments, like they are supposed
to.
2008-10-29 21:35:45 +00:00
Roy Marples
cb44b0a46c #ifdef atexit cleanups calling free as the OS should do this for us, but valgrind debuggers need it. 2008-10-06 15:02:32 +00:00
Roy Marples
c3e192a834 Stop ssd from waiting by default - most daemons are good now. 2008-09-26 23:58:57 +00:00