Bug 191800 - [PATCH] fortune(6): fix default search path
Summary: [PATCH] fortune(6): fix default search path
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-11 03:56 UTC by Andy Kosela
Modified: 2014-08-13 12:38 UTC (History)
1 user (show)

See Also:


Attachments
patch.diff (311 bytes, patch)
2014-07-11 03:56 UTC, Andy Kosela
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Kosela 2014-07-11 03:56:17 UTC
Created attachment 144568 [details]
patch.diff

It seems the default behavior of fortune(6) is not as intended when dealing with additional fortune mods from ports which install into /usr/local/share/games/fortune.

sun # pkg info -s fortune-mod-bofh
fortune-mod-bofh-2.0_3         32.1KiB
sun # fortune -f all
___% /usr/share/games/fortune
    ___% freebsd-tips
    ___% murphy
    ___% fortunes
    ___% startrek
    ___% gerrold.limerick
    ___% zippy
    ___% limerick

Attached patch makes fortune(6) search both /usr/share/games/fortune and /usr/local/share/games/fortune when it is present.
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-07-14 23:26:30 UTC
A commit references this bug:

Author: gavin
Date: Mon Jul 14 23:25:30 UTC 2014
New revision: 268637
URL: http://svnweb.freebsd.org/changeset/base/268637

Log:
  fortune(8): Search fortune files installed by ports/packages as well as
  those supplied by the base system.

  PR:		191800
  Submitted by:	Andy Kosela
  MFC after:	1 week

Changes:
  head/games/fortune/fortune/pathnames.h
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-08-13 12:37:44 UTC
A commit references this bug:

Author: gavin
Date: Wed Aug 13 12:36:59 UTC 2014
New revision: 269933
URL: http://svnweb.freebsd.org/changeset/base/269933

Log:
  Merge r268637 from head:

    fortune(8): Search fortune files installed by ports/packages as well as
    those supplied by the base system.

  PR:		191800
  Submitted by:	Andy Kosela

Changes:
_U  stable/10/
  stable/10/games/fortune/fortune/pathnames.h
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-08-13 12:38:45 UTC
A commit references this bug:

Author: gavin
Date: Wed Aug 13 12:38:09 UTC 2014
New revision: 269934
URL: http://svnweb.freebsd.org/changeset/base/269934

Log:
  Merge r268637 from head:

    fortune(8): Search fortune files installed by ports/packages as well as
    those supplied by the base system.

  PR:		191800
  Submitted by:	Andy Kosela

Changes:
_U  stable/9/games/fortune/fortune/
  stable/9/games/fortune/fortune/pathnames.h