From c3cb5b8aa6997138dfa06da39142bf793baeae60 Mon Sep 17 00:00:00 2001 From: Marcin Cieslak Date: Mon, 10 Sep 2012 04:21:16 +0200 Subject: [PATCH] FreeBSD: Don't set MANPATH, use OS configuration - make installer to set up man(1) paths using /usr/local/etc/man.d/* - don't override empty/unset MANPATH with compiled in default --- .../post_install/freebsd/configMin.src | 16 ++++++++++++++++ cde/programs/dtlogin/config/0060.dtsysenv.src | 2 ++ cde/programs/dtsearchpath/dtsp/ManSearchPath.C | 9 +++++++++ cde/programs/dtsearchpath/libCliSrv/UnixEnv.C | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/cde/admin/IntegTools/post_install/freebsd/configMin.src b/cde/admin/IntegTools/post_install/freebsd/configMin.src index 977ac861..ca848fe5 100755 --- a/cde/admin/IntegTools/post_install/freebsd/configMin.src +++ b/cde/admin/IntegTools/post_install/freebsd/configMin.src @@ -10,6 +10,7 @@ XCOMM ####### PRODUCT=CDE FILESET=CDE-MIN DO_CONFIGURATION="" +PREFIX=/usr/local retval=0 FixEtcServices() @@ -194,6 +195,17 @@ RemoveMinFiles() EOF } +SetManPath() +{ + DTMANPATH=CDE_INSTALLATION_TOP/share/man + echo "MANPATH $DTMANPATH" > ${PREFIX}/etc/man.d/cde.conf +} + +UnSetManPath() +{ + rm -f ${PREFIX}/etc/man.d/cde.conf +} + VerifyInstalledFiles() { echo "Status mode owner group filename" @@ -227,6 +239,8 @@ XCOMM ############################################################### : FixEtcInetdDotConf + SetManPath + HASH HASH create the /var/dt/tmp directory for the dtspcd HASH @@ -239,6 +253,8 @@ XCOMM ############################################################### elif [ "$OPERATION" = "deconfigure" ] then + UnsetManPath + UnfixEtcServices : UnfixEtcInetdDotConf diff --git a/cde/programs/dtlogin/config/0060.dtsysenv.src b/cde/programs/dtlogin/config/0060.dtsysenv.src index 1b9a93b9..f69919e0 100644 --- a/cde/programs/dtlogin/config/0060.dtsysenv.src +++ b/cde/programs/dtlogin/config/0060.dtsysenv.src @@ -27,6 +27,7 @@ XCOMM #################################################################### #define HASH # +#if !defined(__FreeBSD__) HASH HASH Source TIMEZONE HASH @@ -55,6 +56,7 @@ if [ -f $MANPATH_FILE -a -r $MANPATH_FILE ]; then export MANPATH="$MANPATH:`cat $MANPATH_FILE`" fi unset MANPATH_FILE +#endif XCOMM ######################### eof ##################### diff --git a/cde/programs/dtsearchpath/dtsp/ManSearchPath.C b/cde/programs/dtsearchpath/dtsp/ManSearchPath.C index b03891da..a1cc948f 100644 --- a/cde/programs/dtsearchpath/dtsp/ManSearchPath.C +++ b/cde/programs/dtsearchpath/dtsp/ManSearchPath.C @@ -42,6 +42,12 @@ ManSearchPath::ManSearchPath const char * sep ) : SearchPath(user, envvar, sep) { +#if defined(__FreeBSD__) + /* Installer on FreeBSD sets up man configuration so that + * setting MANPATH is not necessary + */ + if (!user->OS()->MANPATH().isNull()) { +#endif if (user->DTMANPATH()) search_path = user->FactoryManPath() + "," + *user->DTMANPATH(); else @@ -55,6 +61,9 @@ ManSearchPath::ManSearchPath NormalizePath(); TraversePath(); +#if defined(__FreeBSD__) + } +#endif } diff --git a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C index e00bb2c5..9b34e858 100644 --- a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C +++ b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C @@ -83,7 +83,7 @@ UnixEnvironment::UnixEnvironment() #elif defined(__OpenBSD__) manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man"; #elif defined(__FreeBSD__) - manpath = "/usr/share/man:/usr/local/man"; + manpath = temp; #endif else manpath = temp; -- 2.25.1