20 Commits
Author SHA1 Message Date
Joachim Wiberg a814e85356 doc: complete and cross-link the D-Bus documentation
dbus.md was orphaned: not in dist_docs_DATA, not linked from the
user guide.  Wire it into the doc dist and link it from the index
features list, features.md, initctl.md, and plugins.md, where the
dbus.so plugin entry now disambiguates the external system bus from
the built-in org.finit API.

Document the 64-peer cap, the supported AddMatch keys, the busconfig
policy file, the legacy-parity edge semantics with the deliberate
SetRunlevel InvalidArgs divergence, the reload-signal behavior of
Service1.Reload, and the reboot family timeout.  Refresh the stale
initctl.md usage paste, add monitor and the D-Bus transport to
initctl(8), add /run/finit/bus to the filesystem layout, and flatten
the ChangeLog D-Bus entry to house style.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-08-16 22:03:41 +02:00
Joachim Wiberg f42a1fd356 man: sync man pages with documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-10 13:30:12 +02:00
Joachim Wiberg 2e73563eea Fix #369: allow runlevel change using initctl during bootstrap
This change opens up the runlevel change API from bootstrap.  The twist
is that the change is only queued, i.e., the call `initctl runlevel 9`
during bootstrap only changes the configured runlevel to go to after
bootstrap has completed.

Effectively, this change allows overriding the `runlevel` directive in
/etc/finit.conf without having to change the file.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-03 15:11:33 +02:00
Tobias Waldekranz c23a867485 initctl: Follow priciple of least surprise for "cond get"
The accepted standard in Unix is to report successful executions with
exitcode 0. Therefore, map a "initctl cond get" of a condition to the
following exitcodes:

- On: 0
- Off: 1
- Flux: 255

Fixes: c3c662fe64 ("initctl: ensure 'cond get' support flux state")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
2023-02-06 16:01:18 +01:00
Joachim Wiberg 320e91653b initctl: add -n,--noerr to return OK(0) if svc doesn't exist
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-19 19:57:25 +01:00
Joachim Wiberg c3c662fe64 initctl: ensure 'cond get' support flux state
The 'initctl cond' commands were initiallý added to only manage usr
conditions.  Recently the 'cond get' command was expanded to allow
reading general conditions as well.

However, since general conditions support three states the command
returned 'on' for conditions that were in flux.  This patch fixes
that oversight.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-15 06:34:05 +01:00
Joachim Wiberg 2a62fa3d85 Fix #329: add support for multiple args to initctl cond set/clr
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-07 14:00:16 +01:00
Joachim Wiberg 4d0c88bd7a man: add missing period at end of sentences
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-11-14 07:33:44 +01:00
Joachim Wiberg 9e8c601507 man: rewrite status command description
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-11-14 07:28:59 +01:00
Joachim Wiberg d27f114742 Document new -j,--json output option in initctl
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-11-09 16:43:11 +01:00
Joachim Wiberg a61a8015d7 initctl: new command, list installed plugins
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-15 11:00:39 +02:00
Joachim Wiberg 6286ede985 initctl: add optional TYPE argument to 'cond dump' command
Allow filtering of conditions in raw dump, i.e., the possibility to show
only conditions of a certain type.  The TYPE argument is not validated
in any way, so any prefix match is allowed, e.g.

   initctl cond dump service/s

Shows all conditions for services starting with 's'.

Fixes issue #272

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-06-12 23:37:03 +02:00
Joachim Wiberg fc653e4293 man: document initctl cond get
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-05-15 20:45:00 +02:00
Joachim Wiberg 021d011493 man: mention the UNIX pipe at least once in every man page
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-05-10 08:11:37 +02:00
Joachim Wiberg 8690fc732b Fix #263: document confusing initctl reload foo command
What a ride, apparently we support restarting run/tasks in the same
runlevel they have already started once in.  Still unsure if adding
support for reloading a particular Finit .conf file for a service
should be in the context of this command (it isn't now).  Maybe it
is better left as a future expansion when we switch to the new .conf
format?

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-05-10 08:03:36 +02:00
Jörgen Sigvardsson 62da379472 initctl signal command parsing: done 2022-02-15 12:29:40 +01:00
Joachim Wiberg d12370568f initctl: add -v,--version command line option
This patch adds the -v,--version option to initctl, which acts as an
alias to the 'version' command.  For now they end up in the same old
function, printing the program version.  However, in time this will be
changed so that the 'version' command asks a running Finit for its
version instead of assuming the daemon is of the same version.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-01-30 11:02:38 +01:00
Joachim Wiberg cdede817fd initctl: new command 'ident [NAME]' shows ids of all/named services
As suggested in issue #197, this new command: 'initctl id [NAME]'
lists identities of all, or named, services.  E.g,

    # initctl id telnetd
    telnetd:23
    telnetd:2323

The NAME argument is optional, when omitted it lists all enabled
run/task/sysv/service in the system, with their full name, and any
optional identitty.  E.g.

    # initctl id
    dropbear
    tty:console
    mdnsd
    mini-snmpd
    smcrouted
    sntpd
    ssdpd
    sysklogd
    watchdogd
    httpd
    telnetd:23
    telnetd:2323

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-01-02 06:14:42 +01:00
Joachim Wiberg df42c2f6fe Fix #197: initctl status foo should show overview of foo:1, foo:2 ..
When the system has multiple services 'foo' the initctl command
'status foo' should give a focused overview of all matching foo:*,
whereas a 'status foo:2' should show the detailed view of that
particular instance.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-01-02 06:11:57 +01:00
Joachim Wiberg efefa398ce man: initial manual page for initctl
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2021-06-06 12:57:21 +02:00