rc-status: add -f option to allow formatting output

The -f option can be used when showing the status of services in
runlevels to allow making the output more easily parsable.
Currently, the .ini format is the only one supported.
This commit is contained in:
William Hubbs
2019-02-15 14:21:43 -06:00
parent f43cec34ca
commit 427a1ce299
3 changed files with 81 additions and 38 deletions

View File

@@ -17,6 +17,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl aclsuC
.Op Fl f Ar ini
.Op Ar runlevel
.Sh DESCRIPTION
.Nm
@@ -37,6 +38,9 @@ The options are as follows:
Show all runlevels and their services.
.It Fl c , -crashed
List all services that have crashed.
.It Fl f , -format
Select a format for the output. Currently, the only one that can be
specified is ini, which outputs in *.ini format.
.It Fl l , -list
List all defined runlevels.
.It Fl m , -manual