This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Upgraded man command


On Wed, 24 Nov 2004, Harig, Mark wrote:

> > Possibly, the following code in /etc/postinstall/man.sh
> > should be changed:
> >
> >    if [ ! -e ${datadir}/misc/man.conf ] ; then
> >       cp ${datadir}/misc/man.conf.default ${datadir}/misc/man.conf
> >       chmod 644 ${datadir}/misc/man.conf
> >    fi
> >
> > to:
> >
> >    if [ ! -e ${datadir}/misc/man.conf ] ; then
> >       chmod 644 ${datadir}/misc/man.conf
> >       cp ${datadir}/misc/man.conf.default ${datadir}/misc/man.conf
> >    fi
>
> Actually, this suggestion does not help because of
> the 'if [ ! -e ${datadir}/misc/man.conf ]' guard.
>
> My "old" man.conf was obsolete (had errors), but it
> was the default at the time (I have never changed it).
>
> Other users may run into this problem and need to apply
> the suggested fix (i.e., overwrite /usr/share/misc/man.conf
> with /usr/share/misc/man.conf.default, after adding write
> permission to /usr/share/misc/man.conf).

There's always the solution that base-files uses for replacing various
config files -- it checks whether the file is the same as the default in
the preremove script, and erases it if so.  Then the postinstall script
copies the new default, and the config file is up-to-date.  This won't
work if the users edited their config files, but should work in most
cases.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]