mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Gaetan Boismal
11.30.2016 a9918f21f0a997dd7305cba9b95ad0c23a8ab5e8
OPENDJ-2601 man pages not found on CentOS7

The file where to set the man path may vary according to the
distributions.
If /etc/man.config does not exists on the operating system, we look for
/etc/man_db.conf and edit it if this file exists.
If none of the above files exist, we do nothing.
Thanks to Fabio for his help and his review.
1 files modified
9 ■■■■■ changed files
opendj-packages/opendj-rpm/resources/specs/postinstall.sh 9 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-rpm/resources/specs/postinstall.sh
@@ -64,10 +64,19 @@
    fi
fi
MAN_CONFIG_FILE=NOT_SET
# Add OpenDJ man pages to MANPATH
if [ -e /etc/man.config ] ; then
MAN_CONFIG_FILE=/etc/man.config
MANPATH_DIRECTIVE=MANPATH
elif [ -e /etc/man_db.conf ] ; then
    MAN_CONFIG_FILE=/etc/man_db.conf
    MANPATH_DIRECTIVE=MANDATORY_MANPATH
fi
if [ $MAN_CONFIG_FILE != "NOT_SET" ] ; then
grep -q "$MANPATH_DIRECTIVE.*opendj" $MAN_CONFIG_FILE 2> /dev/null
if [ $? -ne 0 ]; then
    echo "$MANPATH_DIRECTIVE %{_prefix}/share/man" >> $MAN_CONFIG_FILE
fi
fi