Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489356 - sys-apps/openrc many helper command symlinks undocumented
Summary: sys-apps/openrc many helper command symlinks undocumented
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-25 10:57 UTC by Duncan
Modified: 2014-05-05 07:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2013-10-25 10:57:10 UTC
While investigating bugs in openrc at various times, I've repeatedly run into undocumented helper commands symlinked to /sbin/openrc.  These should all have manpages, probably as a single actual manpage, but with entries for all (I don't know how man multiplexes entries so each one appears as a separate man entry, but I've seen it do so for other manpages so I know it's possible).

$>>cd /lib64/rc/bin

$>>for entry in *; do man $entry; done
No manual entry for checkpath
No manual entry for ebegin
No manual entry for eend
No manual entry for eerror
No manual entry for eerrorn
No manual entry for eindent
No manual entry for einfo
No manual entry for einfon
No manual entry for eoutdent
No manual entry for esyslog
No manual entry for eval_ecolors
No manual entry for ewaitfile (or a single manpage with entries for all, I'm not sure how man handles that but I've seen it before):
No manual entry for ewarn
No manual entry for ewarnn
No manual entry for ewend
No manual entry for fstabinfo
No manual entry for get_options
No manual entry for is_newer_than
No manual entry for is_older_than
No manual entry for mountinfo
No manual entry for on_ac_power
No manual entry for rc-depend
No manual entry for save_options
No manual entry for service_crashed
No manual entry for service_get_value
No manual entry for service_hotplugged
No manual entry for service_inactive
No manual entry for service_set_value
No manual entry for service_started
No manual entry for service_started_daemon
No manual entry for service_starting
No manual entry for service_stopped
No manual entry for service_stopping
No manual entry for service_wasinactive
No manual entry for shell_var
No manual entry for vebegin
No manual entry for veend
No manual entry for veindent
No manual entry for veinfo
No manual entry for veoutdent
No manual entry for vewarn
No manual entry for vewend

$>>cd ../sbin

$>>for entry in *; do man $entry; done
No manual entry for mark_service_failed
No manual entry for mark_service_hotplugged
No manual entry for mark_service_inactive
No manual entry for mark_service_started
No manual entry for mark_service_starting
No manual entry for mark_service_stopped
No manual entry for mark_service_stopping
No manual entry for mark_service_wasinactive
No manual entry for rc-abort
No manual entry for swclock

Of the above, the ones I've actually looked for and found no manpage include checkpath, fstabinfo and mountinfo, but the others should be documented as well.  I've ended up having to run them with --help to see how they work and especially what the options mean, in ordered to sleuth out what a script is actually doing and where the bug I'm looking for is happening.
Comment 1 Duncan 2013-10-25 11:00:00 UTC
Some of these could be quite useful outside of openrc context as well, another reason to nicely document them. =:^)
Comment 2 William Hubbs gentoo-dev 2013-10-31 19:08:58 UTC
(In reply to Duncan from comment #0)
> While investigating bugs in openrc at various times, I've repeatedly run
> into undocumented helper commands symlinked to /sbin/openrc.  These should
> all have manpages, probably as a single actual manpage, but with entries for
> all (I don't know how man multiplexes entries so each one appears as a
> separate man entry, but I've seen it do so for other manpages so I know it's
> possible).

These helpers are meant to be used within init scripts, and do not appear in the standard path.

I think having separate man pages for these would be the equivalent of asking the portage team to have separate man pages for the ebuild helpers in /usr/lib/portage/bin/ebuild-helpers. These are documented on man 5 ebuild, because that reflects the context where they are meant to be used.

A better possibility would be a section added to the runscript man page that lists these helpers with a brief description of what they do.
Comment 3 Duncan 2013-11-01 06:17:10 UTC
(In reply to William Hubbs from comment #2)
> A better possibility would be a section added to the runscript man page that
> lists these helpers with a brief description of what they do.

WORKSFORME. =:^)

Tho multiplexing them such that "man checkpath" would open up the runscript manpage would be helpful too.  I didn't know how to describe it better or the mechanism behind it, but just remembered that swapon/swapoff work that way and looked to see how that did it.  Seems the swapoff.8 "manpage" is a stub, simply consisting of the text:

.so man8/swapon.8

... thus pointing to swapon.8, which is the "real" manpage. =:^)

So once the runscript manpage is updated, having stub entries like
checkpath.8 (filename) containing content like

.so man8/runscript.8

... pointing back to the runscript manpage, would be nice. =:^)

Sort of like man-style symlinks, I guess.

But just having the documentation in the runscript manpage would suffice.  I'd like the stub-entries too, but perhaps that's just me.

(Debian seems to like manpages for everything and I see the preliminary openrc Debian work in git.  Perhaps they can help with this and bug #389344 too as I believe they'll want the manpage documentation too, and the porting there should help catch other omissions in the documentation too, certainly a good thing.)

Thanks. =:^)
Comment 4 Duncan 2014-05-05 07:11:16 UTC
Cleaning up my "my bugs" list.

I switched to systemd a couple months ago and am no longer following openrc close enough for the documentation requested here to be of any use to me.  Given the lack of CCs, presumably it's of little use to others as well.

As a result, I'm closing "UPSTREAM", since any further movement will depend on openrc upstream.  Of course that's gentoo, so if anyone decides this is worth reopening, please request it.