William Hubbs
9a2115f762
rc-status: show status for supervised services instead of a list
2018-12-03 15:16:17 -06:00
William Hubbs
fa6611b5af
rc-status: add --supervised option to show supervised services
2018-12-02 18:33:25 -06:00
William Hubbs
db01442580
rc-status: show failed services as failed
2018-12-02 18:33:25 -06:00
Holger Hoffstätte
79648ac1c6
rc-status: initialize uptime pointer to prevent memory corruption
...
This fixes #231 .
2018-06-29 08:49:13 -05:00
William Hubbs
be7ad06d4a
rc-status: convert snprintf calls to xasprintf
2018-06-19 17:06:33 -05:00
William Hubbs
a616516895
rc-status: fix gcc 7 warnings
2018-06-19 16:18:48 -05:00
William Hubbs
faa8318b3b
Remove the _rc_can_find_pids function
...
This test to find if we could see pid 1 was being used inconsistently in
rc-status and mark_service_crashed to decide whether we could test to
see if the daemon for the service was crashed, and it was not part of
the librc library.
I am removing it from the executables because of inconsistent usage. I
will add it to the library if it is needed there.
2018-05-18 16:48:21 -05:00
William Hubbs
82da844b42
implement "unsupervised" status
...
The unsupervised status is to be used when a supervisor of a supervised
service dies but leaves the service daemon itself running.
2017-10-26 13:11:12 -05:00
William Hubbs
a2055af900
rc_status: calculate time differences in time_t and display seconds in uptime
2017-05-15 18:55:47 -05:00
William Hubbs
82e12e3092
rc-status: show uptimes and respawn counts for supervised daemons
2017-05-11 21:39:03 -05:00
William Hubbs
695be59083
rc-status: add -m/--manual option to show manually started services
...
X-Gentoo-Bug: 585906
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=585906
2016-07-18 13:20:56 -05:00
William Hubbs
3a1262703f
Remove the DEBUG_MEMORY macro
...
This fixes #43 .
2016-07-14 16:52:57 -05:00
William Hubbs
20035210bd
make variable aflag a boolean show_all
2016-07-14 12:13:17 -05:00
William Hubbs
bf2f40828e
Remove multicall binary structure from OpenRC
...
This eliminates the need for the selinux-specific wrapper scrript we
were installing in /lib*/rc/{bin,sbin}.
2016-01-12 10:42:14 -06:00
William Hubbs
000503fad7
Convert OpenRC to a centralized copyright/license structure
...
In the past, OpenRC was a hybrid of a centralized and file-scope
license/copyright structure.
I followed the instructions from the Software Freedom Law Center [1] to
convert to a Centralized structure where possible, for easier future
maintenance.
[1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
2015-12-21 12:16:06 -06:00
Ian Stakenvicius
33d3f33b3c
Implement "want" dependency
...
The want dependency is similar to the use dependency. If a service
script, for example called service1, adds "want service2" to its depend
function, OpenRC will attempt to start service2, if it exists on the
system, when service1 is started.
However, service1 will start regardless of the status of
service2.
X-Gentoo-Bug: 406021
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406021
2015-11-12 12:32:45 -06:00
Anthony G. Basile
1e0a4bebde
Bundle <sys/queue.h> from NetBSD
...
We are bundling this to allow building on musl-based systems since musl
does not include <sys/queue.h>.
2014-10-23 19:14:06 -05:00
William Hubbs
40f42ced21
rc-status: fix infinite loop when using stacked runlevels
...
Remove the recursive call in print_stacked_services which was causing an
infinite loop when using stacked runlevels.
I would like to thank Doug Freed and Jason Zaman for assisting with
tracking this down.
X-Gentoo-Bug: 514972
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=514972
2014-07-17 23:10:28 -05:00
William Hubbs
0ba14ae720
style fixes
2013-09-23 12:40:26 -05:00
Alexander V Vershilov
7716bf31de
Fix stacked runlevel support
...
Patch was provided by Max Hacking <max.gentoo.bugzilla@hacking.co.uk>
and slightly fixed by Alexander Vershilov <qnikst@gentoo.org> and
William Hubbs <williamh@gentoo.org>.
Fixes:
1). Rebase to newest OpenRC version.
2). Remove code style fixes. Port to currect code style.
3). Fix rc_runlevel_stack instead of introducing new function.
4). Make get_runlevel_chain a private function.
X-Gentoo-Bug: 467368
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=467368
2013-09-20 14:27:31 -05:00
Alexander V Vershilov
c18d623dc0
rc-status: fix typo
...
X-Gentoo-Bug: 477318
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477318
2013-07-19 15:30:28 -05:00
Alexander V Vershilov
0f70cd067f
rc-status: fix -a to show all services
...
We need to unset rc_svcname so that all of the services are added to the
list to display.
X-Gentoo-Bug: 409787
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=409787
2013-07-16 12:53:03 -05:00
Andrew Gregory
927207c1b7
rc-status: improve usage message accuracy and consistency
...
This makes it more clear that many of the options are used as an
alternative to a runlevel.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-02-25 14:44:04 -06: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
Roy Marples
6615eb4b68
Add runlevel stacking, #88
...
This implementation has the limitation that you cannot have a stacked
runlevel and service of the same name in a runlevel.
2009-05-02 12:26:45 +01:00
Roy Marples
658a220638
Add (c) to Copyright
2009-05-01 15:11:40 +01:00
Roy Marples
b0ac71fe2a
Add missing show levels switch.
2009-04-24 10:23:49 +00:00
Roy Marples
9966a902ab
rc-status -c now lists services that have crashed.
...
It returns 0 if there are crashed services, otherwise 1.
This it easy to restart crashed services automatically.
More for #120 .
2009-04-24 10:17:53 +00:00
Roy Marples
7086df5664
Don't include hotplugged services in manual.
2009-04-23 20:27:40 +00:00
Roy Marples
3d37005a3d
We now warn about clock skews
...
rc-update -u will force a regen of the dep tree
rc_newer_than and rc_olderthan now take another two parameters for newest/oldest file and mtime
2009-01-12 23:53:13 +00:00
Roy Marples
1acbfcf5ca
Report invalid runlevels.
2008-12-04 17:17:09 +00:00
Roy Marples
bde35d03ed
Actally show hotplugged services.
2008-12-01 08:46:25 +00:00
Roy Marples
2ff0838abb
We should show hotplugged services, needed services and manually started services in rc-status.
2008-10-30 14:59:14 +00:00
Roy Marples
39ea0cb84d
Use the new rc_stringlist_find function.
2008-09-18 15:28:20 +00:00
Roy Marples
80a17eb596
Clean up some compile warnings.
2008-09-18 13:09:51 +00:00
Roy Marples
54d7aa39dd
If we don't have permission to inspect the pidfile, don't report crashed. Gentoo #218028 .
2008-04-21 10:56:28 +00:00
Roy Marples
57e1dd7389
Fix rc-status some more.
2008-04-17 00:25:08 +00:00
Roy Marples
425abe40c5
Only report unassigned services when there are any, Gentoo #218005 .
2008-04-16 19:47:19 +00:00
Roy Marples
0e38dcc4d2
By default, rc-status now shows the statuses of the services in the current runlevel and any unassigned non stopped services, #52 .
2008-04-09 22:56:32 +00:00
Roy Marples
15d34d0a16
Add license blurb to a few files and append my email to my name.
2008-03-26 17:53:37 +00:00
Roy Marples
06635dedbc
We don't change service here.
2008-03-23 22:57:56 +00:00
Roy Marples
f7f3b6ae09
euid 0 should always be able to find pids too.
2008-03-21 17:41:01 +00:00
Roy Marples
85a6addd23
Only test crashed services if we can see pid 1.
2008-03-21 13:04:29 +00:00
Roy Marples
b2f7606b23
We should check for NULL here.
2008-03-17 14:31:44 +00:00
Roy Marples
cb9da6a262
Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ from queue(3). Refactor code style around the BSD KNF.
2008-03-16 17:00:56 +00:00
Roy Marples
ad780077d2
Welcome to 2008.
2008-02-22 12:07:34 +00:00
Roy Marples
567f8e33f2
Just use the extern applet var.
2008-02-11 20:14:09 +00:00
Roy Marples
09ff8eeecd
rc-status -r now shows the current runlevel name.
2008-02-08 21:11:44 +00:00
Roy Marples
04b1a62c4b
Only use hilite if stdout is a tty
2008-02-07 23:24:09 +00:00
Roy Marples
fef5d0af59
Constantise as much as possible so that it reduces COW usage.
2008-02-01 19:54:46 +00:00