Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor command line options #95

Closed
troglobit opened this issue Jun 7, 2017 · 4 comments
Closed

Refactor command line options #95

troglobit opened this issue Jun 7, 2017 · 4 comments
Assignees
Milestone

Comments

@troglobit
Copy link
Owner

Since pimd 3.0 will not be fully backwards compatible (see #93), this is a good time to simplify and streamline the command line options. A user which does not read the ChangeLog and notices the change in major number on upgrade, may actually read it if the old options no longer work.

Proposed new usage:

pimd [OPTIONS]

 -f FILE          Configuration file, default uses ident NAME: /etc/pimd.conf
 -d [SYS]         Debug subsystem, see below for valid systems, default all
 -h               Show this help text
 -i NAME          Identity for config + PID file, and syslog, default: pimd
 -l LEVEL         Set log level: none, err, info, notice*, debug
 -n               Run in foreground, do not detach from calling terminal
 -N               Disable all virtual interfaces (phyint) by default
 -p USER[:GROUP]  Drop privs after init
 -P FILE          PID file for signaling pimd, default uses ident: /run/pimd.pid
 -s               Use syslog, default unless running in foreground, -n
 -t ID            Set multicast routing table ID. 
 -v               Show pimd version
@troglobit troglobit added this to the 3.0 milestone Jun 7, 2017
@troglobit troglobit self-assigned this Jun 8, 2017
troglobit added a commit that referenced this issue Jun 14, 2017
This patch is the first in a series of changes to the pimd command line
interface.  The intentions are:

1) Simplify and align with what other (multicast) daemon(s) use
2) Alert users of the fact that this pimd may not be compatible with
   compatible versions, see fa81d14

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
@troglobit
Copy link
Owner Author

First stage committed in aa7bdfe, probably also remove --long-options.

@ipinlnd
Copy link

ipinlnd commented Oct 15, 2017

May I know the reason for this change?
I mean, for example, wasn't it easier to just read the routes with a "pimd -r" ? This way we have to run the program in foreground or watch syslog messages.
Thanks

@troglobit
Copy link
Owner Author

Race conditions and poor design, are the main reasons.

The intention is to add a pimctl tool to interact with a running pimd, similar to how other daemons work.

You can still use signals and look for the status file, which is what pimd -r wrapping anyway.

@troglobit
Copy link
Owner Author

Hidden feature request for privilege separation moved to separate issue, #115

troglobit added a commit that referenced this issue Jan 1, 2019
o Change case for program identidy: -I NAME --> -i NAME
o Drop -N and keep long option --disable-vifs
o Drop -P and keep long option --pidfile=FILE

Update man page accordingly.  Also, fix triple dash to --syslog and
add missing line break in phyint description.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants