[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to move a conffile to a new location?



"James R. Van Zandt" <jrv@vanzandt.mv.com> writes:

   Wichert Akkerman replied:
   >Multiple times actually :). What you have to do is *carefully* move the
   >conffile in the preinst.

   The nearest thing to an example I found on my system was this from
   ncurses-term.preinst:

     set -e
     # /usr/lib/terminfo used to be the standard place for terminfo
     # entries.  Now, it's /usr/share/terminfo.  So if /usr/lib/terminfo
     # _isn't_ a symbolic link, move the whole thing to /usr/share.
     if [ -e /usr/lib/terminfo -a ! -L /usr/lib/terminfo ]; then
       cp -dR /usr/lib/terminfo /usr/share;
       rm -rf /usr/lib/terminfo;
     fi

I do this in autoconf.preinst:

    #! /bin/sh -e
    test -e /etc/autoconf/acconfig.h && exit 0
    test -f /usr/lib/autoconf/acconfig.h || exit 0
    mkdir -p /etc/autoconf
    mv /usr/lib/autoconf/acconfig.h /etc/autoconf/acconfig.h

I hope there aren't any hidden gotchas in that; no one has complained
so far.


Reply to: