diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-10-04 14:19:59 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-10-04 14:19:59 +0200 |
commit | 9a1b2605476c8e6e69a3666e9f538004b6623962 (patch) | |
tree | b0fc11eb7ffc7c5c28aeca6aac2fa3e0c071aefb | |
parent | d678257c26e0993efc48ac4433d153e1e9dfc954 (diff) | |
download | busybox-9a1b2605476c8e6e69a3666e9f538004b6623962.tar.gz |
man: add compatibility with man-db
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r-- | miscutils/man.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/miscutils/man.c b/miscutils/man.c index 2d3776cf3..b356e726f 100644 --- a/miscutils/man.c +++ b/miscutils/man.c @@ -182,16 +182,21 @@ int man_main(int argc UNUSED_PARAM, char **argv) pager = "more"; } - /* Parse man.conf[ig] */ + /* Parse man.conf[ig] or man_db.conf */ /* man version 1.6f uses man.config */ + /* man-db implementation of man uses man_db.conf */ parser = config_open2("/etc/man.config", fopen_for_read); if (!parser) parser = config_open2("/etc/man.conf", fopen_for_read); + if (!parser) + parser = config_open2("/etc/man_db.conf", fopen_for_read); while (config_read(parser, token, 2, 0, "# \t", PARSE_NORMAL)) { if (!token[1]) continue; - if (strcmp("MANPATH", token[0]) == 0) { + if (strcmp("MANDATORY_MANPATH"+10, token[0]) == 0 /* "MANPATH"? */ + || strcmp("MANDATORY_MANPATH", token[0]) == 0 + ) { char *path = token[1]; while (*path) { char *next_path; |