#1546 sss_seed "-h" and "--help" options should output similar results
Closed: Fixed None Opened 11 years ago by apeetham.

The man page for sss_seed tool shows "-h" and "--help" as valid options for getting detailed help information. Hence, the output of "-h" and "--help" should be similar. However when sss_seed is executed with "-h" option, a usage message appears with an exit status of 1 and when it is executed with "--help" option, detailed help message appears with an exit status of 0. Please review the output below:

[root@rhel-64 ~]# sss_seed -h
Usage: sss_seed [-?i] [-?|--help] [--usage] [-D|--domain STRING] [-n|--username STRING] [-u|--uid INT] [-g|--gid INT] [-c|--gecos STRING]
[-h|--home STRING] [-s|--shell STRING] [-i|--interactive] [-p|--password-file STRING] [OPTIONS] -D <domain> -n <username>
missing argument

[root@rhel-64 ~]# echo $?
1

[root@rhel-64 ~]# sss_seed --help
Usage: sss_seed [OPTIONS] -D <domain> -n <username>
-D, --domain=STRING Domain
-n, --username=STRING Username
-u, --uid=INT User UID
-g, --gid=INT User GID
-c, --gecos=STRING Comment string
-h, --home=STRING Home directory
-s, --shell=STRING Login Shell
-i, --interactive Use interactive mode to enter user data
-p, --password-file=STRING File from which user's password is read (default is to prompt for password)

Help options:
-?, --help Show this help message
--usage Display brief usage message

[root@rhel-64 ~]# echo $?
0


This is a man page issue. It affects not only sss_seed tool, but other tools as well.

The POPT_AUTOHELP generates '-?' and '--help' and not '-h' option. We use '-h' as short option for '--home' in sss_seed. So we need to replace the '-h' option with '-?' for help in man pages.

The help message needs to be update too, it does not show '-h' as alternative for '--home' (see sss_seed -?).

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.9.1
rhbz: => 0

Fields changed

owner: somebody => mzidek

Fields changed

patch: 0 => 1
resolution: => fixed
status: new => closed

Fields changed

resolution: fixed =>
status: closed => reopened

This ticket wasn't closed yet, just acked on list. Please don't close until the patches are pushed to master.

master: a20fff2

resolution: => fixed
status: reopened => closed

Metadata Update from @apeetham:
- Issue assigned to mzidek
- Issue set to the milestone: SSSD 1.9.1

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/2588

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata