update of configuration files and ALFS

Vassili Dzuba vassilidzuba at nerim.net
Mon Mar 3 13:22:12 PST 2003


The LFS book often instructs to update configuration files,
using something like

cat >> /etc/the_config_file << EOF

In a ALFS profile, it becomes :

   <textdump mode="append" base="/etc">

However, in both cases, if we execute twice the instructions,
we will several times the specified text appended to the file.
It can be harmfull or not according to the cases, but it's
probably not a good way to work.

In (B)LFS, the updates to configuration files are often 
bracketted by comments :

cat >> /etc/ld.so.conf << "EOF"
# Begin qt addition to /etc/ld.so.conf


# End qt addition

I propose to expand <textdump> functions to insert automatically
the comments, and use them to avoid to insert the configuration text
several times.

e.g. :

<textdump mode="insert" package="qt" base="/etc">

That would insert :

# Begin qt insert
# End qt insert

To take into account the files where '#' is not a comment marker,
one could use :

    <textdump mode="insert" package="qt" base="/etc" commentchar="//">

or, if we want to be able to specifify the full

    <textdump mode="insert" package="qt" base="/etc">
        <insertfrom># Begin of insertion qt</insertfrom>
        <insertto># End of insertion qt</insertto>

Any comment ?

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message

More information about the alfs-discuss mailing list