On Thursday 31 July 2008, Otavio Salvador wrote:
> > I don't really like the idea of hook scripts determining how the main
> > script works.
>
> Could you clarify why?

Because not only is there absolutely no need for them to do so, it is also 
seriously fragile to expect random hook scripts to output nothing else 
than their progress bar end position.

Remember that anybody (think preseeding) can drop in hook scripts.

With the proposed patch a hook script can blow up the whole postinst by 
just "leaking" some output to STDOUT.

Example
-------
Hook script has:
    if grep "GenuineIntel" /proc/cpuinfo; then
         <do something>
    fi
    exit 0

Due to the minor bug of the forgotten '-q' progress_to will be equal to
    vendor_id       : GenuineIntel

And with 'set -e'
    if [ "$progress_to" -gt $progress_from ]; then
will make the postinst go BOOOOM!



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to