mkdivert & rmdivert WAS: gpm (woody)

Geert Stappers Geert.Stappers at xs4all.nl
Tue Nov 27 14:07:56 CET 2001


At 13:29 +0100 11/27/01, Martin_J Carter wrote:
>Saith Chad Walstrom <chad at ima.umn.edu> 2001-11-26 17:46:15:
>
>>On Mon, Nov 26, 2001 at 05:59:55PM +0100, Ingo Herz wrote:
>>> Hi,
>>>
>>> I'm trying to get gpm installed with fai. postinstall gives an endless
>>> loop showing the common configuration. As I want to copy gpm.conf in
>>> place by script after installation there is no need to configure gpm.
>>>
>>> Any hints?
>>
>>Yep. ;-)  In a ../hooks/instsoft.CLASS file, where CLASS is the class in
>>which gpm is installed, you need to do a "mkdivert /usr/sbin/gpmconfig"
>>to push the gpm configuration out of the way.  Remember to remove this
>>diversion in a ../hooks/final.CLASS file.
>
>Oh *that*'s how to do it properly :-) .... When I had exactly similar
>problems,
>I solved it by hand-adding "touch /etc/gpm.conf" to prepare_apt(), which
>happens to work in this particular case.
>
>Thanks for the enlightenment,
>

For in the mail archive the examples from Chad Walstrom once again:


Here's a list of packages that you'll want to divert applications for.

    PACKAGE         APPLICATION
    --------------- ---------------------------------
    gpm             /usr/sbin/gpmconfig
    apache*         /usr/sbin/apacheconfig
    ispell**        /usr/sbin/update-ispell-dictionary

* Included in this list should be all of the libapache-mod-* packages as
    well.
** Included in this list should be all of the iamerican, idutch, etc.
    dictionary packages as well.

Example:

    #! /bin/sh
    #
    # ../hooks/instsoft.WORKSTATION
    #
    # 1. Divert configuration apps (stdin dependent)
    #    - update-ispell-dictionary
    #    - gpmconfig

    mkdivert /usr/sbin/gpmconfig
    mkdivert /usr/sbin/update-ispell-dictionary

    # EOF

    #! /bin/sh
    #
    # ../hooks/final.WORKSTATION
    #
    # 1. Divert configuration apps (stdin dependent)
    #    - update-ispell-dictionary
    #    - gpmconfig

    rmdivert /usr/sbin/gpmconfig
    rmdivert /usr/sbin/update-ispell-dictionary

    # EOF

If you want to copy over files after the 'install' action, add a script
to fcopy over your desired /etc/gpm.conf.

    #! /bin/sh
    #
    # ../scripts/WORKSTATION
    #
    # 1. Copy over gpm.conf from ../files/etc/gpm.conf/CLASS
    # ...

    # Copy over the gpm.conf file or create a null file
    fcopy /etc/gpm.conf || touch ${target}/etc/gpm.conf

    # EOF




Geert




More information about the linux-fai mailing list